Evaluates an expression and wraps its value into a Future
.
Evaluates an expression and wraps its value into a Future
. Failed Future
is returned if expression
evaluation throws an exception. This is very similar to Future.apply
but evaluates the argument immediately,
without dispatching it to some ExecutionContext
.
Different version of Future.sequence
.
Different version of Future.sequence
. Transforms a TraversableOnce[Future[A]]
into a Future[TraversableOnce[A]
, which only completes after all in
Future
s are completed.
the type of the value inside the Futures
the type of the TraversableOnce
of Futures
the TraversableOnce
of Futures which will be sequenced
the Future
of the TraversableOnce
of results
Different version of Future.traverse
.
Different version of Future.traverse
. Transforms a TraversableOnce[A]
into a Future[TraversableOnce[B]]
,
which only completes after all in
Future
s are completed, using the provided function A => Future[B]
.
This is useful for performing a parallel map. For example, to apply a function to all items of a list
the type of the value inside the Futures in the TraversableOnce
the type of the value of the returned Future
the type of the TraversableOnce
of Futures
the TraversableOnce
of Futures which will be sequenced
the function to apply to the TraversableOnce
of Futures to produce the results
the Future
of the TraversableOnce
of results