Blocks for a specified timeout until the promise has a value or an exception; throws java.
Blocks for a specified timeout until the promise has a value or an exception; throws java.util.concurrent.TimeoutException if the promise is not redeemed in time. Unlike Await.result() in Akka, does NOT throw an exception from the Promise itself.
Blocks for Promise.
Blocks for Promise.defaultTimeout until the promise has a value or an exception; throws java.util.concurrent.TimeoutException if the promise is not redeemed within the default timeout period. Unlike Await.result() in Akka, does NOT throw an exception from the Promise itself.
Creates a new Promise[B], by running the function k on this promise after it is redeemed with a value or exception.
Creates a new Promise[B], by running the function k on this promise after it is redeemed with a value or exception. The function may run in another thread. extend() is similar to map() but can modify an exception contained in the promise, not only a successful value.
function to be executed on this promise
Like extend() but gives your function the promise's value rather than the promise itself.
Like extend() but gives your function the promise's value rather than the promise itself.
function to be executed on this promise
Computes a new Promise which will be completed with NoSuchElementException if the value of this promise does not match the given predicate.
Computes a new Promise which will be completed with NoSuchElementException if the value of this promise does not match the given predicate. The predicate may be run in another thread.
predicate
Registers a callback to be invoked when (and if) the promise is completed with a non-exception value.
Registers a callback to be invoked when (and if) the promise is completed with a non-exception value. The callback may run in another thread.
the callback
Returns a Promise representing the first-completed of this promise or another promise.
Returns a Promise representing the first-completed of this promise or another promise. The resulting Promise contains either Left(resultOfThisPromise), Right(resultOfOtherPromise), or an exception which could be from either of the two promises.
promise to be composed with
Creates a scheduled promise with Throwable e (using the deafult Promise timeout).
Creates a scheduled promise with Throwable e (using the deafult Promise timeout). Exception e is shown if scheduled promise redeemds first
exception to be thrown
a Promise which may throw an exception
Creates a scheduled promise with the given message (using the deafult Promise timeout).
Creates a scheduled promise with the given message (using the deafult Promise timeout). Message a is shown if the scheduled promise redeems before the current promise
message to be displayed if the scheduled promise redeems first
either the scheduled message or the current promise
Creates a scheduled promise with the given message.
Creates a scheduled promise with the given message. Message a is shown if the scheduled promise redeems before the current promise
message to be displayed if the scheduled promise redeems first
duration
either the scheduled message or the current promise
Synonym for await, blocks for the promise to be completed with a value or an exception.
A promised value that wraps around scala.concurent.Future. The value of the promise is to be computed asynchronously. The promise will be completed either with the expected value type or with an exception.
(Since version 2.2) Use scala.concurrent.Promise instead.