May 2017
Intermediate to advanced
414 pages
13h
English
In the preceding recipe, we computed the sum of two numbers by wrapping it in a future. We mapped the result to Int as we were expecting sum. We imported scala.concurrent.ExecutionContext.Implicits.global to execute the future. Here, we are using the Await pattern to block the current thread to retrieve the result.
After you run the preceding application, you will see the following result:
Future Result 3
Read now
Unlock full access