Skip to content

Instantly share code, notes, and snippets.

@ThomasAlexandre
Created February 15, 2012 20:15
Show Gist options
  • Save ThomasAlexandre/1838711 to your computer and use it in GitHub Desktop.
Save ThomasAlexandre/1838711 to your computer and use it in GitHub Desktop.
Akka Simple Dataflow Concurrency Example
import dispatch._
import akka.dispatch._
import Future.flow
val params = Promise[Map[String,String]]()
val deals = Future( Http( url("http://localhost:8086/deals") <<? params.get as_str ))
println("Result:" + deals.result)
flow { params << Map ("city" -> "stockholm") }
Thread.sleep(2000)
println("Result:" + deals.result)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment