Fan

 

const final class

sys::Future

sys::Obj
  sys::Future

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

See docLang::Actors

Slots

cancelSource

Void cancel()

Cancel this message if it has not begun processing. No guarantee is made that the actor won't process this message.

getSource

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.

isCancelledSource

Bool isCancelled()

Return if this message has been cancelled.

isDoneSource

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.