This is an excerpt from the Scala Cookbook (partially modified for the internet). This is Recipe 13.8, “Monitoring the death of an Akka Actor with ‘watch’”.Back to top
You want an actor to be notified when another actor dies.Back to top
watch method of an actor’s context object to declare that the actor should be notified when an actor it’s monitoring is stopped.
There’s just one person behind this website; if this article was helpful (or interesting), I’d appreciate it if you’d share it. Thanks, Al.