Adding pool size for both use with dispatcher as without.
This commit is contained in:
parent
b862ec97f5
commit
7918a6f72b
2 changed files with 6 additions and 7 deletions
|
|
@ -40,13 +40,13 @@ private[akka] class NettyRemoteTransport(_system: ExtendedActorSystem, _provider
|
|||
// TODO replace by system.scheduler
|
||||
val timer: HashedWheelTimer = new HashedWheelTimer(system.threadFactory)
|
||||
|
||||
val clientChannelFactory = settings.UseDispatcherForIO match {
|
||||
val clientChannelFactory = {
|
||||
settings.UseDispatcherForIO match {
|
||||
case Some(id) ⇒
|
||||
val d = system.dispatchers.lookup(id)
|
||||
new NioClientSocketChannelFactory(d, d)
|
||||
new NioClientSocketChannelFactory(d, d, settings.ClientSocketWorkerPoolSize)
|
||||
case None ⇒
|
||||
new NioClientSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool(),
|
||||
settings.ClientSocketWorkerPoolSize)
|
||||
new NioClientSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool(), settings.ClientSocketWorkerPoolSize)
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -29,10 +29,9 @@ private[akka] class NettyRemoteServer(val netty: NettyRemoteTransport) {
|
|||
settings.UseDispatcherForIO match {
|
||||
case Some(id) ⇒
|
||||
val d = netty.system.dispatchers.lookup(id)
|
||||
new NioServerSocketChannelFactory(d, d)
|
||||
new NioServerSocketChannelFactory(d, d, settings.ServerSocketWorkerPoolSize)
|
||||
case None ⇒
|
||||
new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool(),
|
||||
settings.ServerSocketWorkerPoolSize)
|
||||
new NioServerSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool(), settings.ServerSocketWorkerPoolSize)
|
||||
}
|
||||
|
||||
// group of open channels, used for clean-up
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue