=doc #18226 document actor stopping
This commit is contained in:
parent
b25e76e95c
commit
996ad35495
4 changed files with 62 additions and 8 deletions
|
|
@ -136,6 +136,25 @@ class ReplyException extends Actor {
|
|||
|
||||
}
|
||||
|
||||
class StoppingActorsWrapper {
|
||||
//#stoppingActors-actor
|
||||
class MyActor extends Actor {
|
||||
|
||||
val child: ActorRef = ???
|
||||
|
||||
def receive = {
|
||||
case "interrupt-child" =>
|
||||
context stop child
|
||||
|
||||
case "done" =>
|
||||
context stop self
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//#stoppingActors-actor
|
||||
}
|
||||
|
||||
//#gracefulStop-actor
|
||||
object Manager {
|
||||
case object Shutdown
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue