Created
September 30, 2014 10:51
-
-
Save nicl/776368c22ab21faddc15 to your computer and use it in GitHub Desktop.
Scala concurrency questions
This file contains 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
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