Global

Type Definitions

executor(resolve, reject, cancel) → {function}

This function is used to execute the an action for a given Task or Future, and then notifies the appropriate provided callbac (success, error or cancellation).

If the executor returns a function, it will be invoked when the Task/Future is cancelled. This is useful to run cleanup code.

Parameters:
Name Type Description
resolve function

Invoke this callback to resolve the Task/Future

reject function

Invoke this callback to reject the Task/Future

cancel function

Invoke this callback to cancel the Task/Future

Returns:
Type:
function

a function that is invoked when the Task/Future is cancelled.