#1703 & #1693 - moving daemonicity to one place, and in doing so creating a thread factory in ActorSystem
This commit is contained in:
parent
03bc15feb1
commit
8dfe619140
14 changed files with 57 additions and 48 deletions
|
|
@ -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
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue