remove ActorRef from Failed/ChildTerminated and make some warnings nicer

- the same information is transmitted as sender, hence enabling
  ChildTerminated to become a singleton
- make lastSender accessible in TestKit (needed now for DeathWatchSpec)
- fix nasty infinite loop when logging at the wrong moment during
  shutdown
This commit is contained in:
Roland 2011-11-12 22:37:12 +01:00
parent 1ba168774f
commit 02a5cd081c
14 changed files with 57 additions and 49 deletions

View file

@ -196,8 +196,8 @@ abstract class MessageDispatcher(val app: ActorSystem) extends Serializable {
protected[akka] def unregister(actor: ActorCell) {
_actors.decrementAndGet()
val mailBox = actor.mailbox
mailBox.becomeClosed()
actor.mailbox = deadLetterMailbox //FIXME getAndSet would be preferrable here
actor.mailbox = deadLetterMailbox
mailBox.becomeClosed() // FIXME reschedule in tell if possible race with cleanUp is detected in order to properly clean up
cleanUpMailboxFor(actor, mailBox)
}