Fixing bug where a dispatcher would shut down the executor service before all tasks were executed, also taking the opportunity to decrease the size per mailbox by atleast 4 bytes

This commit is contained in:
Viktor Klang 2011-11-14 14:09:23 +01:00
parent 0307a655d3
commit e40b7cd8d6
7 changed files with 22 additions and 36 deletions

View file

@ -98,14 +98,15 @@ class Dispatcher(
}
}
protected[akka] def createMailbox(actor: ActorCell): Mailbox = mailboxType.create(this, actor)
protected[akka] def createMailbox(actor: ActorCell): Mailbox = mailboxType.create(actor)
protected[akka] def start {}
protected[akka] def shutdown {
val old = executorService.getAndSet(new LazyExecutorServiceWrapper(executorServiceFactory.createExecutorService))
if (old ne null)
old.shutdownNow()
if (old ne null) {
old.shutdown()
}
}
/**