Alternative future frameworks

Scala futures and promises API resulted from an attempt to consolidate several different APIs for asynchronous programming, among them, legacy Scala futures, Akka futures, Scalaz futures, and Twitter's Finagle futures. Legacy Scala futures and Akka futures have already converged to the futures and promises APIs that you've learned about so far in this chapter. Finagle's com.twitter.util.Future type is planned to eventually implement the same interface as scala.concurrent.Future, while the Scalaz scalaz.concurrent.Future type implements a slightly different interface. In this section, we give a brief description of Scalaz futures.

To use Scalaz, we add the following dependency to the build.sbt file:

libraryDependencies ...

Get Learning Concurrent Programming in Scala - Second Edition 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.