- Index
- »
- concurrent
- »
- Future
type
Future
@Js
abstract const class Future : Obj
Future represents the result of an asynchronous computation.
See Actors
constructors
make |
Subclass constructor |
---|
methods
cancel |
Cancel this computation if it has not begun processing. |
---|---|
complete |
Complete the future successfully with given value. |
completeErr |
Complete the future with a failure condition using given exception. |
get |
Block current thread until result is ready. |
makeCompletable |
Construct a completable future instance in the pending state. |
state |
Current state of asynchronous computation |
status |
Current state of asynchronous computation |
waitFor |
Block until this future transitions to a completed state (ok, err, or canceled). |
waitForAll |
Block on a list of futures until they all transition to a completed state. |
Slot Details
cancel
abstract Void cancel()
Cancel this computation if it has not begun processing. No guarantee is made that the computation will be cancelled.
complete
completeErr
get
make
new make()
Subclass constructor
makeCompletable
static Future makeCompletable()
Construct a completable future instance in the pending state. This method is subject to change.
state
@Deprecated { msg="Use status" }
virtual FutureState state()
Current state of asynchronous computation
status
abstract FutureStatus status()
Current state of asynchronous computation