Switching so that createMailbox is called in the ActorCell constructor

This commit is contained in:
Viktor Klang 2011-09-26 15:28:13 +02:00
parent 648c8698a6
commit 7f8f0e8afb
2 changed files with 8 additions and 11 deletions

View file

@ -164,10 +164,7 @@ abstract class MessageDispatcher extends Serializable {
*/
protected[akka] def register(actor: ActorCell): Unit = {
if (uuids add actor.uuid) {
if (actor.mailbox eq null) {
actor.mailbox = createMailbox(actor)
systemDispatch(SystemEnvelope(actor, Create, NullChannel))
}
systemDispatch(SystemEnvelope(actor, Create, NullChannel)) //FIXME should this be here or moved into ActorCell.start perhaps?
if (active.isOff) {
active.switchOn {
start()