Reformating configuration and examples for PDF (Scala, and leftovers). See #2413
This commit is contained in:
parent
309bb53d98
commit
08ef942242
46 changed files with 330 additions and 191 deletions
|
|
@ -22,8 +22,10 @@ class RouterDocSpec extends AkkaSpec {
|
|||
|
||||
//#dispatchers
|
||||
val router: ActorRef = system.actorOf(Props[MyActor]
|
||||
.withRouter(RoundRobinRouter(5, routerDispatcher = "router")) // “head” will run on "router" dispatcher
|
||||
.withDispatcher("workers")) // MyActor workers will run on "workers" dispatcher
|
||||
// “head” will run on "router" dispatcher
|
||||
.withRouter(RoundRobinRouter(5, routerDispatcher = "router"))
|
||||
// MyActor workers will run on "workers" dispatcher
|
||||
.withDispatcher("workers"))
|
||||
//#dispatchers
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ class ParentActor extends Actor {
|
|||
//#randomRouter
|
||||
case "smr" ⇒
|
||||
//#smallestMailboxRouter
|
||||
val smallestMailboxRouter =
|
||||
context.actorOf(Props[PrintlnActor].withRouter(SmallestMailboxRouter(5)), "router")
|
||||
val smallestMailboxRouter = context.actorOf(Props[PrintlnActor].
|
||||
withRouter(SmallestMailboxRouter(5)), "router")
|
||||
1 to 10 foreach {
|
||||
i ⇒ smallestMailboxRouter ! i
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue