Skip to content

Instantly share code, notes, and snippets.

@patriknw
Created July 9, 2013 06:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save patriknw/5955043 to your computer and use it in GitHub Desktop.
Save patriknw/5955043 to your computer and use it in GitHub Desktop.
Remote Watch Spotlight
case object Register
class Master extends Actor {
var workers = Set.empty[ActorRef]
def receive = {
case Register =>
workers += sender
context watch sender
case Terminated(ref) =>
workers -= ref
case ...
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment