diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2019-11-03 22:27:37 +0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2019-11-03 22:27:37 +0800 |
commit | 27b5d45d919cbc8d37fcc0194bb9bd39603a532e (patch) | |
tree | 1b55e43599c6e2b1bff316b1e9cd28601cec0479 /docs | |
parent | 3eefc92d20d1b705374fdd2cce46b2176c65b6eb (diff) | |
download | cask-0.3.3.tar.gz cask-0.3.3.tar.bz2 cask-0.3.3.zip |
0.3.30.3.3
Diffstat (limited to 'docs')
-rw-r--r-- | docs/pages/1 - Cask: a Scala HTTP micro-framework.md | 4 | ||||
-rw-r--r-- | docs/pages/4 - Cask Actors.md | 8 |
2 files changed, 6 insertions, 6 deletions
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` |