summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2019-11-03 23:19:30 +0800
committerLi Haoyi <haoyi.sg@gmail.com>2019-11-03 23:19:30 +0800
commit4da9f351409e2aeeb34cf31c576a3eb08f26e795 (patch)
tree1a21512c5d59afcf38b452181fc9145f13d6803e
parentf7b2a7b84a6ca561fad2a534091db93dc9486754 (diff)
downloadcask-4da9f351409e2aeeb34cf31c576a3eb08f26e795.tar.gz
cask-4da9f351409e2aeeb34cf31c576a3eb08f26e795.tar.bz2
cask-4da9f351409e2aeeb34cf31c576a3eb08f26e795.zip
actor readme
-rw-r--r--docs/pages/4 - Cask Actors.md7
1 files changed, 7 insertions, 0 deletions
diff --git a/docs/pages/4 - Cask Actors.md b/docs/pages/4 - Cask Actors.md
index dca3afe..5d8d3c7 100644
--- a/docs/pages/4 - Cask Actors.md
+++ b/docs/pages/4 - Cask Actors.md
@@ -341,3 +341,10 @@ distinct states which an Actor can be in, as it forces you explicitly define the
states, the members of each state, as well as the state transitions that occur
when each state receives each message. When the number of distinct states grows,
`StateMachineActor` can be significantly easier to use than `SimpleActor`.
+
+While it is good practice to make your `State`s immutable, `StateMachineActor`
+does not enforce it. Similarly, it is generally good practice to avoid defining
+"auxiliary" mutable state `var`s in the body of a `StateMachineActor`. The
+library does not enforce that either, but doing so somewhat defeats the purpose
+of using a `StateMachineActor` to model your actor state in the first place, in
+which case you might as well use `SimpleActor`. \ No newline at end of file