Include dispatcher id in thread name of pinned dispatcher, see #2585

* Additional tests
* Moved id append from createExecutorServiceFactory in
  ThreadPoolExecutorConfigurator to ThreadPoolConfig
This commit is contained in:
Patrik Nordwall 2012-10-02 09:31:23 +02:00
parent a7adfce7e5
commit 614caa2989
3 changed files with 37 additions and 14 deletions

View file

@ -88,8 +88,15 @@ case class ThreadPoolConfig(allowCorePoolTimeout: Boolean = ThreadPoolConfig.def
service
}
}
final def createExecutorServiceFactory(id: String, threadFactory: ThreadFactory): ExecutorServiceFactory =
new ThreadPoolExecutorServiceFactory(threadFactory)
final def createExecutorServiceFactory(id: String, threadFactory: ThreadFactory): ExecutorServiceFactory = {
val tf = threadFactory match {
case m: MonitorableThreadFactory
// add the dispatcher id to the thread names
m.copy(m.name + "-" + id)
case other other
}
new ThreadPoolExecutorServiceFactory(tf)
}
}
object ThreadPoolConfigBuilder {