Future

Methods
3
Fields
None

Methods

MethodReturnsDescription
cancel(boolean)booleanCancel the task: it will not run again. false when it had already run (a one-shot) or was cancelled. A task runs on the client thread, ne…
isCancelled()booleanWhether it was cancelled before it completed.
isDone()booleanWhether it completed: a one-shot that ran, or any task cancelled.

Method details

cancel

cancel: (Future, boolean) -> boolean

Cancel the task: it will not run again. false when it had already run (a one-shot) or was cancelled. A task runs on the client thread, never beside this call, so there is nothing to interrupt.

isCancelled

isCancelled: (Future) -> boolean

Whether it was cancelled before it completed.

isDone

isDone: (Future) -> boolean

Whether it completed: a one-shot that ran, or any task cancelled.