Add warning about passing mutable state into the constructor of an Actor

I was bitten by this when I created actors as a reaction in recieve, passing sender as parameter to the new Actor.
This commit is contained in:
Björn Harrtell 2012-08-25 13:05:27 +03:00
parent 66d071ab84
commit d65ed2a007

View file

@ -108,6 +108,9 @@ Here is an example:
meaning of an actor restart, which is described here:
:ref:`supervision-restart`.
Also avoid passing mutable state into the constructor of the Actor, since
the call-by-name block can be executed by another thread.
Props
-----