February 2018
Intermediate to advanced
552 pages
13h 46m
English
A computation unit is a block of code (which is used to perform a task or calculate some value and so on). Generally, this computation unit runs synchronously. If we place this computation unit in the Future, it runs asynchronously.
If this computation is completed successfully, the Future contains a value of type T. If this computation is completed with a failure, the Future contains an exception of type, Throwable.
The following diagram shows the Scala Future and its subtypes:

Like Scala constructs, such as Option, Either, Try, and so on, a Scala Future is also a container type. It may contain a value or an exception ...
Read now
Unlock full access