reuse dispatcher thread for remoting in REPL
This commit is contained in:
parent
ec585ed4fa
commit
ddadb1bb06
1 changed files with 7 additions and 1 deletions
8
repl
8
repl
|
|
@ -8,7 +8,13 @@ val remoteConfig = try {
|
||||||
} catch {
|
} catch {
|
||||||
case _: ClassNotFoundException => ""
|
case _: ClassNotFoundException => ""
|
||||||
}
|
}
|
||||||
val config=ConfigFactory.parseString("akka.daemonic=on" + remoteConfig)
|
val config=ConfigFactory.parseString("""
|
||||||
|
akka.daemonic=on
|
||||||
|
akka.remote.netty {
|
||||||
|
use-dispatcher-for-io = akka.actor.default-dispatcher
|
||||||
|
execution-pool-size = 0
|
||||||
|
}
|
||||||
|
""" + remoteConfig)
|
||||||
val sys=ActorSystem("repl", config.withFallback(ConfigFactory.load())).asInstanceOf[ExtendedActorSystem]
|
val sys=ActorSystem("repl", config.withFallback(ConfigFactory.load())).asInstanceOf[ExtendedActorSystem]
|
||||||
implicit val ec=sys.dispatcher
|
implicit val ec=sys.dispatcher
|
||||||
import akka.util.duration._
|
import akka.util.duration._
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue