Making use-dispatcher-for-io also used for the client connector
This commit is contained in:
parent
ebfda69c83
commit
0517fac42e
1 changed files with 7 additions and 4 deletions
|
|
@ -40,10 +40,13 @@ private[akka] class NettyRemoteTransport(_system: ExtendedActorSystem, _provider
|
|||
// TODO replace by system.scheduler
|
||||
val timer: HashedWheelTimer = new HashedWheelTimer(system.threadFactory)
|
||||
|
||||
// TODO make configurable/shareable with server socket factory
|
||||
val clientChannelFactory = new NioClientSocketChannelFactory(
|
||||
Executors.newCachedThreadPool(system.threadFactory),
|
||||
Executors.newCachedThreadPool(system.threadFactory))
|
||||
val clientChannelFactory = settings.UseDispatcherForIO match {
|
||||
case Some(id) ⇒
|
||||
val d = system.dispatchers.lookup(id)
|
||||
new NioClientSocketChannelFactory(d, d)
|
||||
case None ⇒
|
||||
new NioClientSocketChannelFactory(Executors.newCachedThreadPool(), Executors.newCachedThreadPool())
|
||||
}
|
||||
|
||||
/**
|
||||
* Backing scaffolding for the default implementation of NettyRemoteSupport.createPipeline.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue