ActorHierarchyExperiments: Send a start message to the first actor (#27204)

This commit is contained in:
Johan Andrén 2019-06-27 20:54:09 +01:00 committed by GitHub
commit 4af031c9a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -188,7 +188,8 @@ class Main extends AbstractBehavior<String> {
public class ActorHierarchyExperiments {
public static void main(String[] args) {
ActorSystem.create(Main.createBehavior(), "testSystem");
ActorRef<String> testSystem = ActorSystem.create(Main.createBehavior(), "testSystem");
testSystem.tell("start");
}
}
// #print-refs

View file

@ -146,7 +146,8 @@ class Main(context: ActorContext[String]) extends AbstractBehavior[String] {
}
object ActorHierarchyExperiments extends App {
ActorSystem(Main(), "testSystem")
val testSystem = ActorSystem(Main(), "testSystem")
testSystem ! "start"
}
//#print-refs