Skip to content

Instantly share code, notes, and snippets.

@rkuhn
Created September 26, 2012 18:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rkuhn/3789797 to your computer and use it in GitHub Desktop.
Save rkuhn/3789797 to your computer and use it in GitHub Desktop.
actor dsl demo
import akka.actor.ActorDSL._
val ref = actor("fred")(new Act {
become {
case "hello" => sender ! "world!"
}
})
implicit val recv = inbox()
ref ! "hello" // uses the `recv` as sender ref
recv.select() { case "world!" => println("got it") }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment