From 445ffa3a7ddfe99ff1a0c78edc0a8f516cd7938c Mon Sep 17 00:00:00 2001 From: Viktor Klang Date: Tue, 21 Feb 2012 12:03:14 +0100 Subject: [PATCH] #1842 - Documenting initial behavior --- akka-docs/general/actors.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/akka-docs/general/actors.rst b/akka-docs/general/actors.rst index 4d8f2c8096..2d9ff67488 100644 --- a/akka-docs/general/actors.rst +++ b/akka-docs/general/actors.rst @@ -66,6 +66,11 @@ behavior logic, or the function itself may be swapped out at runtime, see the during construction of the actor object is special in the sense that a restart of the actor will reset its behavior to this initial one. +.. note:: + The initial behavior of an Actor is extracted prior to constructor is run, + so if you want to base your initial behavior on member state, you should + use ``become`` in the constructor. + Mailbox -------