Java API.
Java API. Returns a Future to the result of the first future in the list that is completed
Returns a Future to the result of the first future in the list that is completed
Java API A non-blocking fold over the specified futures.
Java API A non-blocking fold over the specified futures. The fold is performed on the thread where the last future is completed, the result will be the first failure of any of the futures, or any failure in the actual fold, or the result of the fold.
A non-blocking fold over the specified futures.
A non-blocking fold over the specified futures. The fold is performed on the thread where the last future is completed, the result will be the first failure of any of the futures, or any failure in the actual fold, or the result of the fold. Example:
val result = Futures.fold(0)(futures)(_ + _).await.result
Java API, equivalent to Future.
Java API, equivalent to Future.apply
Java API, equivalent to Future.
Java API, equivalent to Future.apply
Java API, equivalent to Future.
Java API, equivalent to Future.apply
Java API, equivalent to Future.
Java API, equivalent to Future.apply
Java API.
Java API. Initiates a fold over the supplied futures where the fold-zero is the result value of the Future that's completed first
Initiates a fold over the supplied futures where the fold-zero is the result value of the Future that's completed first Example:
val result = Futures.reduce(futures)(_ + _).await.result
Java API.
Java API. Simple version of Futures.traverse. Transforms a java.lang.Iterable[Future[A]] into a Future[java.lang.Iterable[A]]. Useful for reducing many Futures into a single Future.
Java API.
Java API. Simple version of Futures.traverse. Transforms a java.lang.Iterable[Future[A]] into a Future[java.lang.Iterable[A]]. Useful for reducing many Futures into a single Future.
Java API.
Java API. Transforms a java.lang.Iterable[A] into a Future[java.lang.Iterable[B]] 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 in parallel.
Java API.
Java API. Transforms a java.lang.Iterable[A] into a Future[java.lang.Iterable[B]] 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 in parallel.
(Blocking!)
(Blocking!)
Will be removed after 1.1, if you must block, use: futures.foreach(_.await)
Returns Future.
Returns Future.resultOrException of the first completed of the 2 Futures provided (blocking!)
Will be removed after 1.1, if you must block, use: firstCompletedOf(List(f1,f2)).await.resultOrException
Applies the supplied function to the specified collection of Futures after awaiting each future to be completed
Applies the supplied function to the specified collection of Futures after awaiting each future to be completed
Will be removed after 1.1, if you must block, use: futures map { f ⇒ fun(f.await) }
Returns the First Future that is completed (blocking!)
Returns the First Future that is completed (blocking!)
Will be removed after 1.1, if you must block, use: firstCompletedOf(futures).await