const class concurrent::Future
sys::Obj concurrent::Future
@Js
Future represents the result of an actor's asynchronous computation of a message.
See Actors
- cancel
-
Void cancel()
Cancel this message if it has not begun processing. No guarantee is made that the actor won't process this message.
- get
-
Obj? get(Duration? timeout := null)
Wait for the actor's result. If timeout occurs then TimeoutErr is raised. A null timeout blocks forever. If an exception was raised by the Actor, then it is raised to the caller of this method. If msg is not immutable or serializable, then IOErr is thrown.
- isCancelled
-
Bool isCancelled()
Return if this message has been cancelled.
- isDone
-
Bool isDone()
Return true if the actor's message has completed processing. Completion may be due to the actor returning a result, throwing an exception, or cancellation.