reuse dispatcher thread for remoting in REPL

This commit is contained in:
Roland 2012-07-02 08:15:39 +02:00
parent ec585ed4fa
commit ddadb1bb06

8
repl
View file

@ -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._