Futures

trait Futures
Companion
object
class Object
trait Matchable
class Any
object Futures

Value members

Concrete methods

def before[T, TO](other: Future[TO])(f: Future[T])(implicit ec: ExecutionContext): Future[T]
def promisedFuture[T](keepPromise: Promise[T] => Unit): Future[T]

Constructs a future that is completed according to keepPromise. This pattern can be used to convert callback-based APIs to Future-based ones. For example, parameter keepPromise can call some callback-based API, and the callback implementation can complete the supplied promise.

Constructs a future that is completed according to keepPromise. This pattern can be used to convert callback-based APIs to Future-based ones. For example, parameter keepPromise can call some callback-based API, and the callback implementation can complete the supplied promise.

Type Params
T

type of value to complete promise with

Value Params
keepPromise

code that completes the promise

Returns

the future completion value