May 2017
Intermediate to advanced
414 pages
13h
English
import akka.actor.{Actor, ActorSystem, Props, Terminated}
case object Service case object Kill
class ServiceActor extends Actor { def receive = { case Service => println("I provide a special service") } }
class DeathWatchActor extends Actor { val child = context.actorOf(Props[ServiceActor], "serviceActor") context.watch(child) def receive = { case Service => child ! Service case Kill => context.stop(child) case Terminated(`child`) ...Read now
Unlock full access