Created
January 30, 2011 20:49
-
-
Save seanparsons/803235 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 IntMatchActor extends Actor { | |
def receive = { | |
case 1 => self.reply("This is number 1.") | |
case 2 => self.reply("This is number 2, it comes after 1.") | |
case _ => self.reply("This value is neither 1 nor 2.") | |
} | |
} | |
val intMatchActor = actorOf[IntMatchActor].start | |
println(intMatchActor !! 1) | |
println(intMatchActor !! 99) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment