#1703 & #1693 - moving daemonicity to one place, and in doing so creating a thread factory in ActorSystem

This commit is contained in:
Viktor Klang 2012-01-20 12:30:19 +01:00
parent 03bc15feb1
commit 8dfe619140
14 changed files with 57 additions and 48 deletions

View file

@ -32,7 +32,14 @@ class Dispatcher(
val shutdownTimeout: Duration)
extends MessageDispatcher(_prerequisites) {
protected[akka] val executorServiceFactory = executorServiceFactoryProvider.createExecutorServiceFactory(id)
protected[akka] val executorServiceFactory: ExecutorServiceFactory =
executorServiceFactoryProvider.createExecutorServiceFactory(
id,
prerequisites.threadFactory match {
case m: MonitorableThreadFactory m.copy(m.name + "-" + id)
case other other
})
protected[akka] val executorService = new AtomicReference[ExecutorService](new ExecutorServiceDelegate {
lazy val executor = executorServiceFactory.createExecutorService
})