Adding :ActorRef to signal that actorOf returns an ActorRef for routers as well

This commit is contained in:
Viktor Klang 2012-08-30 18:05:28 +02:00
parent 2c251ccf1c
commit 4c859420d1

View file

@ -21,7 +21,7 @@ class RouterDocSpec extends AkkaSpec {
import RouterDocSpec._ import RouterDocSpec._
//#dispatchers //#dispatchers
val router = system.actorOf(Props[MyActor] val router: ActorRef = system.actorOf(Props[MyActor]
.withRouter(RoundRobinRouter(5, routerDispatcher = "router")) // head will run on "router" dispatcher .withRouter(RoundRobinRouter(5, routerDispatcher = "router")) // head will run on "router" dispatcher
.withDispatcher("workers")) // MyActor workers will run on "workers" dispatcher .withDispatcher("workers")) // MyActor workers will run on "workers" dispatcher
//#dispatchers //#dispatchers