Merge branch 'wip-1466-remove-stop-rk'

This commit is contained in:
Roland 2011-12-14 15:56:08 +01:00
commit 1ab2cecc2c
87 changed files with 475 additions and 359 deletions

View file

@ -113,7 +113,7 @@ public class Pi {
Result result = (Result) message;
pi += result.getValue();
nrOfResults += 1;
if (nrOfResults == nrOfMessages) getSelf().stop();
if (nrOfResults == nrOfMessages) getContext().stop(getSelf());
} else throw new IllegalArgumentException("Unknown message [" + message + "]");
//#handle-messages
}
@ -157,7 +157,7 @@ public class Pi {
latch.await();
// Shut down the system
system.stop();
system.shutdown();
}
}
//#app
//#app

View file

@ -62,7 +62,7 @@ object Pi extends App {
pi += value
nrOfResults += 1
// Stops this actor and all its supervised children
if (nrOfResults == nrOfMessages) self.stop()
if (nrOfResults == nrOfMessages) context.stop(self)
//#handle-messages
}
//#master-receive
@ -98,7 +98,7 @@ object Pi extends App {
latch.await()
// Shut down the system
system.stop()
system.shutdown()
}
}
//#app

View file

@ -17,7 +17,7 @@ class WorkerSpec extends WordSpec with MustMatchers with BeforeAndAfterAll {
implicit val system = ActorSystem()
override def afterAll {
system.stop()
system.shutdown()
}
"Worker" must {