object FutureCompanionOps

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. FutureCompanionOps
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. def eval[T](expr: ⇒ T): commons.Future[T]

    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.

  2. def sequenceCompleted[A, M[X] <: TraversableOnce[X]](in: M[commons.Future[A]])(implicit cbf: CanBuildFrom[M[commons.Future[A]], A, M[A]], executor: commons.ExecutionContext): commons.Future[M[A]]

    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 Futures are completed.

    A

    the type of the value inside the Futures

    M

    the type of the TraversableOnce of Futures

    in

    the TraversableOnce of Futures which will be sequenced

    returns

    the Future of the TraversableOnce of results

  3. def traverseCompleted[A, B, M[X] <: TraversableOnce[X]](in: M[A])(fn: (A) ⇒ commons.Future[B])(implicit cbf: CanBuildFrom[M[A], B, M[B]], executor: commons.ExecutionContext): commons.Future[M[B]]

    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 Futures 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

    A

    the type of the value inside the Futures in the TraversableOnce

    B

    the type of the value of the returned Future

    M

    the type of the TraversableOnce of Futures

    in

    the TraversableOnce of Futures which will be sequenced

    fn

    the function to apply to the TraversableOnce of Futures to produce the results

    returns

    the Future of the TraversableOnce of results