Added name of the listener actor in pi sample

This commit is contained in:
Patrik Nordwall 2012-01-30 07:44:38 +01:00
parent 43ec4c5895
commit 7201a7e24b
2 changed files with 2 additions and 2 deletions

View file

@ -180,7 +180,7 @@ public class Pi {
ActorSystem system = ActorSystem.create("PiSystem");
// create the result listener, which will print the result and shutdown the system
final ActorRef listener = system.actorOf(new Props(Listener.class));
final ActorRef listener = system.actorOf(new Props(Listener.class), "listener");
// create the master
ActorRef master = system.actorOf(new Props(new UntypedActorFactory() {

View file

@ -95,7 +95,7 @@ object Pi extends App {
val system = ActorSystem("PiSystem")
// create the result listener, which will print the result and shutdown the system
val listener = system.actorOf(Props[Listener])
val listener = system.actorOf(Props[Listener], name = "listener")
// create the master
val master = system.actorOf(Props(new Master(