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:
parent
a7adfce7e5
commit
614caa2989
3 changed files with 37 additions and 14 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue