const class concurrent::Future

sys::Obj
  concurrent::Future

@Js

Source

Future represents the result of an actor's asynchronous computation of a message.

See Actors

cancel

Void cancel()

Source

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)

Source

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()

Source

Return if this message has been cancelled.

isDone

Bool isDone()

Source

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.