Added support for a config flag that allows the user to reuse the default dispatcher as the ExecutorService for the Netty Remote Pipeline (IO)
This commit is contained in:
parent
1f30be1f87
commit
45694c65f4
3 changed files with 9 additions and 3 deletions
|
|
@ -26,9 +26,10 @@ class NettyRemoteServer(val netty: NettyRemoteTransport) {
|
|||
|
||||
val ip = InetAddress.getByName(settings.Hostname)
|
||||
|
||||
private val factory = new NioServerSocketChannelFactory(
|
||||
Executors.newCachedThreadPool(netty.system.threadFactory),
|
||||
Executors.newCachedThreadPool(netty.system.threadFactory))
|
||||
private val factory = {
|
||||
val boss, worker = if (settings.UseDefaultDispatcherForIO) netty.system.dispatcher else Executors.newCachedThreadPool()
|
||||
new NioServerSocketChannelFactory(boss, worker)
|
||||
}
|
||||
|
||||
private val executionHandler = new ExecutionHandler(netty.executor)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue