Skip to content

Instantly share code, notes, and snippets.

@ianmcmahon
Created January 31, 2013 20:23
Show Gist options
  • Save ianmcmahon/4686111 to your computer and use it in GitHub Desktop.
Save ianmcmahon/4686111 to your computer and use it in GitHub Desktop.
using scalaj.http.Http makes message sending break
import akka.actor.{ActorSystem, Props, Actor}
import scalaj.http.Http
case object Start
class Master extends Actor {
val worker = context.actorOf(Props[Worker], name = "worker")
def receive = {
case Start =>
worker ! Start
case s:String => println(s)
case _ =>
println("default")
}
}
class Worker extends Actor {
def receive = {
case Start =>
// val data = Http("http://google.com/").asString
sender ! "foo"
}
}
object TestApp extends App {
val system = ActorSystem("TestApp")
val master = system.actorOf(Props[Master], "master")
master ! Start
system.shutdown()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment