Thus, we can guarantee the safety of the flow inside the Actor .
Since the actor will process only one message at a time, we can guarantee that access to the local state of the actor is safe for access, even if the actor himself can switch the flows that he performs. Akka guarantees that the state recorded during the processing of the M1 message will be visible to the Actor if it processes M2 , even if it can now work on a different thread (usually ensuring that this type of security is costly, Akka handles this for you).
It also proceeds from the initial description of the Actor model, which is a concurrency abstraction described as subjects who can process and respond to messages only one after another by doing one of these actions: send other messages, change their behavior or create new participants.
source share