What does actor reentrancy mean?
If you captured any state before doing some async work in your actor, then by the time your task is resumed, your captured state may be stale. This is what actor reentrancy is about. Because of this, you should avoid capturing things that are subject to change before your task is suspended. Instead, only retrieve values after your task is resumed. The term “reentrant” literally means “able to be entered again.” When an actor method suspends at an await point, the actor isn’t locked, other methods can enter and execute, potentially modifying the actor’s state. When your original method resumes, it has “reentered” an actor that may now be in a different state than when it left. ...