Renaming createActor to actorOf
This commit is contained in:
parent
3f258f8b63
commit
474787a81d
68 changed files with 343 additions and 343 deletions
|
|
@ -53,10 +53,10 @@ object Pi extends App {
|
|||
var nrOfResults: Int = _
|
||||
|
||||
// create the workers
|
||||
val workers = Vector.fill(nrOfWorkers)(app.createActor[Worker])
|
||||
val workers = Vector.fill(nrOfWorkers)(app.actorOf[Worker])
|
||||
|
||||
// wrap them with a load-balancing router
|
||||
val router = app.createActor(RoutedProps(
|
||||
val router = app.actorOf(RoutedProps(
|
||||
routerFactory = () ⇒ new RoundRobinRouter,
|
||||
connectionManager = new LocalConnectionManager(workers)), "pi")
|
||||
|
||||
|
|
@ -101,7 +101,7 @@ object Pi extends App {
|
|||
// ==================
|
||||
def calculate(nrOfWorkers: Int, nrOfElements: Int, nrOfMessages: Int) {
|
||||
// create the master
|
||||
val master = app.createActor(new Master(nrOfWorkers, nrOfElements, nrOfMessages))
|
||||
val master = app.actorOf(new Master(nrOfWorkers, nrOfElements, nrOfMessages))
|
||||
|
||||
//start the calculation
|
||||
val start = now
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue