Created
February 11, 2014 02:39
-
-
Save chbatey/8928360 to your computer and use it in GitHub Desktop.
Akka: Example actor that sends a message to its parent
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ChildActor extends Actor { | |
def receive: Actor.Receive = { | |
case "Do something" => { | |
// Do something important | |
context.parent ! "I was told to do something and I did it" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment