ActorHierarchyExperiments: Send a start message to the first actor (#27204)
This commit is contained in:
commit
4af031c9a5
2 changed files with 4 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue