Skip to content

Instantly share code, notes, and snippets.

@nicl
Created September 30, 2014 10:51
Show Gist options
  • Save nicl/776368c22ab21faddc15 to your computer and use it in GitHub Desktop.
Save nicl/776368c22ab21faddc15 to your computer and use it in GitHub Desktop.
Scala concurrency questions
val myFuture = someFuture // from a previous async op
val result = myFuture map { f =>
slowOp(f) // either takes ages or doesn't complete at all
}
// then some timeout on result
timeout(result, fallback)
// question is: if fallback is used, what happens to the execution of the slowOp (does it continue and hog resources?!)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment