I have the following sequential actions on two members: parent P and child C :
- P clock C (
context watch c
) - P unatches C (
context unwatch c
) - P correctly stops C (
c ! PoisonPill
)
What i want to know; I'm sure P is not getting Terminated
event for C ?
Here is a sample code snippet
class HappensBefore extends App { class C extends Actor { def receive = {} } class P extends Actor { val c = context actorOf Props[C] context watch c context unwatch c c ! PoisonPill def receive = { case Terminated(child) => println("Oh Noes!") } } ActorSystem("test") actorOf Props[P] }
source share