From 27b5d45d919cbc8d37fcc0194bb9bd39603a532e Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Sun, 3 Nov 2019 22:27:37 +0800 Subject: 0.3.3 --- docs/pages/1 - Cask: a Scala HTTP micro-framework.md | 4 ++-- docs/pages/4 - Cask Actors.md | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'docs') diff --git a/docs/pages/1 - Cask: a Scala HTTP micro-framework.md b/docs/pages/1 - Cask: a Scala HTTP micro-framework.md index 2e191d3..7fcbd88 100644 --- a/docs/pages/1 - Cask: a Scala HTTP micro-framework.md +++ b/docs/pages/1 - Cask: a Scala HTTP micro-framework.md @@ -81,10 +81,10 @@ via the following coordinates: ```scala // Mill -ivy"com.lihaoyi::cask:0.2.9" +ivy"com.lihaoyi::cask:0.3.3" // SBT -"com.lihaoyi" %% "cask" % "0.2.9" +"com.lihaoyi" %% "cask" % "0.3.3" ``` The `./mill` command is just a wrapper around the diff --git a/docs/pages/4 - Cask Actors.md b/docs/pages/4 - Cask Actors.md index abf2b90..fdff1dd 100644 --- a/docs/pages/4 - Cask Actors.md +++ b/docs/pages/4 - Cask Actors.md @@ -7,10 +7,10 @@ standalone `cask-actor` artifact: ```scala // Mill -ivy"com.lihaoyi::cask-actor:0.2.9" +ivy"com.lihaoyi::cask-actor:0.3.3" // SBT -"com.lihaoyi" %% "cask-actor" % "0.2.9" +"com.lihaoyi" %% "cask-actor" % "0.3.3" ``` Cask Actors are much more lightweight solution than a full-fledged framework @@ -18,7 +18,7 @@ like Akka: Cask Actors do not support any sort of distribution or clustering, and run entirely within a single process. Cask Actors are garbage collectible, and you do not need to manually terminate them or manage their lifecycle. -## A Logger Actor +## Example: Asynchronous Logging using an Actor Here is a small demonstration of using a `cask.actor.SimpleActor` to perform asynchronous logging to disk: @@ -141,7 +141,7 @@ Using Cask Actors to perform logging avoids both these issues: calls to `logger.send` happen in the background without slowing down your main program, and multiple threads can call `logger.send` without being blocked by each other. -## Actor Pipelines +## Parallelism using Actor Pipelines Another advantage of Actors is that you can get pipelined parallelism when processing data. In the following example, we define two actor classes `Writer` -- cgit v1.2.3