Creates a future that resolves after a given time span.
Creates a future that resolves after a given time span.
the time span in ms after which the future resolves
the future
Waits until either all futures are resolved or a given time span has passed.
Waits until either all futures are resolved or a given
time span has passed. Results are collected in a list of
options. The result of a future that resolved during the
time span is its value wrapped in Some
. The result of a
future that did not resolve during the time span is None
.
Note that some of the futures might already have been awaited,
in which case their value is returned wrapped in Some
.
Passing a timeout of 0 causes awaitAll
to return immediately.
the time span in ms after which waiting is aborted
the futures to be awaited
the list of optional future values
if timeout is negative,
or timeout + System.currentTimeMillis()
is negative.
Waits for the first result returned by one of two given futures.
Waits for the first result returned by one of two given futures.
the first future
the second future
the result of the future that resolves first
Arranges for the asynchronous execution of body
,
returning a future representing the result.
Arranges for the asynchronous execution of body
,
returning a future representing the result.
the computation to be carried out asynchronously
the future representing the result of the computation
Methods that operate on futures.
(Since version 2.11.0) Use the object scala.concurrent.Future instead. For migration from the scala.actors package refer to the Actors Migration Guide.