43 Future
After reading this lesson, you will be able to
- Represent an asynchronous computation using
Future
- Process its result on completion
In the previous lesson, have learned about implicit parameters and values; you’ll now see them in action when defining an instance of type Future
. You’ll discover the difference between synchronous and asynchronous computations and how they can affect your program’s performance. You’ll see how you can use the type Future
to define asynchronous computations that can fail. An operation is asynchronous if your program can continue to run without waiting for its outcome. You’ll also process its result once completed. In the capstone, you’ll use the type Future
to read and write data to a database asynchronously ...
Get Get Programming with Scala now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.