Created
February 15, 2012 20:15
-
-
Save ThomasAlexandre/1838711 to your computer and use it in GitHub Desktop.
Akka Simple Dataflow Concurrency Example
This file contains hidden or 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 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