Implemented strictly ordered shutdown between remoteDaemon and transport in RARP.
This commit is contained in:
parent
7de56b406b
commit
752e43a0e7
5 changed files with 115 additions and 38 deletions
|
|
@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue