TryableDeferred
Value members
Abstract methods
Inherited methods
If this Deferred
is empty, sets the current value to a
, and notifies
any and all readers currently blocked on a get
.
If this Deferred
is empty, sets the current value to a
, and notifies
any and all readers currently blocked on a get
.
Note that the returned action may complete after the reference
has been successfully set: use F.start(r.complete)
if you want
asynchronous behaviour.
If this Deferred
has already been completed, the returned
action immediately fails with an IllegalStateException
. In the
uncommon scenario where this behavior is problematic, you can
handle failure explicitly using attempt
or any other
ApplicativeError
/MonadError
combinator on the returned
action.
Satisfies:
Deferred[F, A].flatMap(r => r.complete(a) *> r.get) == a.pure[F]
- Inherited from
- Deferred
Obtains the value of the Deferred
, or waits until it has been completed.
The returned value may be canceled.
Obtains the value of the Deferred
, or waits until it has been completed.
The returned value may be canceled.
- Inherited from
- Deferred