Updated introduction documents to Akka 2.0. Fixes #1480

This commit is contained in:
Henrik Engstrom 2011-12-14 12:08:47 +01:00
parent 66e7155ef1
commit 49e350a815
9 changed files with 327 additions and 744 deletions

View file

@ -50,7 +50,8 @@ object Pi extends App {
var start: Long = _
//#create-router
val router = context.actorOf(Props(new Worker).withRouter(RoundRobinRouter(nrOfInstances = nrOfWorkers)), "pi")
val router = context.actorOf(Props(new Worker).withRouter(
RoundRobinRouter(nrOfInstances = nrOfWorkers)), "pi")
//#create-router
//#master-receive
@ -89,7 +90,9 @@ object Pi extends App {
val latch = new CountDownLatch(1)
// create the master
val master = system.actorOf(Props(new Master(nrOfWorkers, nrOfMessages, nrOfElements, latch)), "master")
val master = system.actorOf(Props(new Master(
nrOfWorkers, nrOfMessages, nrOfElements, latch)),
"master")
// start the calculation
master ! Calculate