new FutureAction()
A future for the result of an action to support cancellation. This is an extension of the
Scala Future interface to support cancellation.
- Source:
Methods
cancel(mayInterruptIfRunning) → {boolean}
Attempts to cancel execution of this task.
Parameters:
Name | Type | Description |
---|---|---|
mayInterruptIfRunning |
boolean |
- Source:
Returns:
- Type
- boolean
get() → {object}
Waits if necessary for the computation to complete, and then retrieves its result.
- Source:
Returns:
- Type
- object
getWithTimeout(timeout) → {object}
Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available.
Parameters:
Name | Type | Description |
---|---|---|
timeout |
number | in milliseconds |
- Source:
Returns:
- Type
- object
isCancelled() → {boolean}
Returns whether the action has been cancelled.
- Source:
Returns:
- Type
- boolean
isDone() → {boolean}
Returns whether the action has already been completed with a value or an exception.
- Source:
Returns:
- Type
- boolean
jobIds() → {Array.<number>}
- Source:
Returns:
- Type
- Array.<number>