Merge branch master into wip-ActorPath-rk
Had to make Davy Jones a bit more robust, i.e. put him into a different system to guarantee survival until all messages are delivered.
This commit is contained in:
commit
9d7597c728
25 changed files with 357 additions and 234 deletions
|
|
@ -137,7 +137,7 @@ abstract class MessageDispatcher(val prerequisites: DispatcherPrerequisites) ext
|
|||
shutdownScheduleUpdater.get(this) match {
|
||||
case UNSCHEDULED ⇒
|
||||
if (shutdownScheduleUpdater.compareAndSet(this, UNSCHEDULED, SCHEDULED)) {
|
||||
scheduler.scheduleOnce(shutdownAction, shutdownTimeout)
|
||||
scheduler.scheduleOnce(shutdownTimeout, shutdownAction)
|
||||
()
|
||||
} else ifSensibleToDoSoThenScheduleShutdown()
|
||||
case SCHEDULED ⇒
|
||||
|
|
@ -212,7 +212,7 @@ abstract class MessageDispatcher(val prerequisites: DispatcherPrerequisites) ext
|
|||
}
|
||||
case RESCHEDULED ⇒
|
||||
if (shutdownScheduleUpdater.compareAndSet(MessageDispatcher.this, RESCHEDULED, SCHEDULED))
|
||||
try scheduler.scheduleOnce(this, shutdownTimeout) catch {
|
||||
try scheduler.scheduleOnce(shutdownTimeout, this) catch {
|
||||
case _: IllegalStateException ⇒ shutdown()
|
||||
}
|
||||
else run()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue