Threw away old ThreadBasedDispatcher and replaced it with an EBEDD with 1 in core pool and 1 in max pool

This commit is contained in:
Viktor Klang 2010-09-20 16:56:12 +02:00
parent 16a7a3ecb0
commit b1462ade30
2 changed files with 25 additions and 39 deletions

View file

@ -189,3 +189,13 @@ class ExecutorBasedEventDrivenDispatcher(
buildThreadPool
}
}
/**
* Usable to create a single-threaded dispatcher
*/
object SingleThread extends Function1[ThreadPoolBuilder,Unit] {
def apply(b: ThreadPoolBuilder) {
b setCorePoolSize 1
b setMaxPoolSize 1
}
}