Created
May 16, 2011 18:21
-
-
Save asv/975003 to your computer and use it in GitHub Desktop.
simple akka example
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
import akka.actor.Actor._ | |
import akka.actor.Actor | |
object FooBar extends Actor { | |
def receive = { | |
case "test" => println("received test") | |
case _ => println("received unknown message") | |
} | |
} | |
object Main { | |
def main(args: Array[String]) = { | |
val act = actorOf(FooBar) | |
act.start | |
act ! "test" | |
} | |
} | |
// vim: set ts=4 sw=4 et: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment