February 2018
Intermediate to advanced
552 pages
13h 46m
English
So far, we have discussed one of the Scala's important Asynchronous Programming API, that is, the Scala Future API.
Scala has another API to support AP easily and very well, and that is the Scala Async API. Let's explore it in this section.
The Scala Async API does not add any extra features to the Scala Asynchronous Programming API. It is similar to the Scala Future API. However, it allows you to compose a set of Asynchronous computations in a simple and concise way.
The Scala Async library introduces two new methods—async and await.
It is available as a separate library in the Scala language. So we should add the following line to the SBT build file:
libraryDependencies += "org.scala-lang.modules" %% "scala-async" ...
Read now
Unlock full access