Skip to content

Instantly share code, notes, and snippets.

@asv
Created May 16, 2011 18:21
Show Gist options
  • Save asv/975003 to your computer and use it in GitHub Desktop.
Save asv/975003 to your computer and use it in GitHub Desktop.
simple akka example
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