From 3c7b7e70beb9013755bcaa0e724190bdfc8c99ea Mon Sep 17 00:00:00 2001 From: Li Haoyi Date: Mon, 4 Nov 2019 22:35:17 +0800 Subject: tweak docs --- docs/pages/4 - Cask Actors.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/docs/pages/4 - Cask Actors.md b/docs/pages/4 - Cask Actors.md index 241caf6..3e04834 100644 --- a/docs/pages/4 - Cask Actors.md +++ b/docs/pages/4 - Cask Actors.md @@ -463,6 +463,13 @@ 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`. +Note that while multiple threads can send messages to `Logger` at once, and the +`Flush()` message can also be sent at an arbitrary time in the future thanks to +the `ac.scheduleMsg` call, the actor will only ever process one message at a +time. This means you can be sure that it will transition through the two states +`Idle` and `Buffering` in a straightforward manner, without worry about multiple +threads executing at once and messing up the simple state machine. + ## Debugging Actors ### Debug Logging State Machines -- cgit v1.2.3