Futures
Concurrency utilities for simplifying the use of Futures for common cases.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
Futures.type
Members list
Value members
Concrete methods
Run a Future and return the result or an Exception if the Future fails or does not complete within the timeout
Run a Future and return the result or an Exception if the Future fails or does not complete within the timeout
Type parameters
- T
-
The type that the Future returns
Value parameters
- f
-
A function that returns a Future
- timeout
-
The maximum amount of time to wait for the Future to complete
Attributes
- Returns
-
The result of the Future or an Exception
This is similar to Future.traverse but it will not fail if one of the Futures fails. Instead, it will return a sequence of results, omitting any that failed.
This is similar to Future.traverse but it will not fail if one of the Futures fails. Instead, it will return a sequence of results, omitting any that failed.
Type parameters
- A
-
The type of the input elements
- B
-
The type of the output elements
Value parameters
- ec
-
The ExecutionContext to use for running the Futures
- f
-
A function that takes an input of type A and returns a Future of type B
- inputs
-
The sequence of inputs to traverse
Attributes
- Returns
-
A Future that completes with a sequence of results of type B, omitting any that failed