Skip to content

Instantly share code, notes, and snippets.

@dkomanov
Created May 25, 2020 16:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dkomanov/ea89072011a974abf5a2b60260850b4c to your computer and use it in GitHub Desktop.
Save dkomanov/ea89072011a974abf5a2b60260850b4c to your computer and use it in GitHub Desktop.
[writing-async-app-in-scala-part-3] benchmark
var future = Future.successful(0)
for (_ <- 1 to 100) {
future = future.map(v => v + 1)
}
require(Await.result(future, 10.seconds) == 100)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment