Implemented strictly ordered shutdown between remoteDaemon and transport in RARP.

This commit is contained in:
Endre Sándor Varga 2012-12-14 16:09:38 +01:00
parent 7de56b406b
commit 752e43a0e7
5 changed files with 115 additions and 38 deletions

View file

@ -26,6 +26,7 @@ private[akka] class RemoteSystemDaemon(
system: ActorSystemImpl,
_path: ActorPath,
_parent: InternalActorRef,
terminator: ActorRef,
_log: LoggingAdapter,
val untrustedMode: Boolean)
extends VirtualPathContainer(system.provider, _path, _parent, _log) {
@ -34,8 +35,6 @@ private[akka] class RemoteSystemDaemon(
private val terminating = new Switch(false)
system.provider.systemGuardian.tell(RegisterTerminationHook, this)
system.eventStream.subscribe(this, classOf[AddressTerminated])
/**
@ -111,7 +110,7 @@ private[akka] class RemoteSystemDaemon(
}
def terminationHookDoneWhenNoChildren(): Unit = terminating.whileOn {
if (!hasChildren) system.provider.systemGuardian.tell(TerminationHookDone, this)
if (!hasChildren) terminator.tell(TerminationHookDone, this)
}
}