Members
isCancelled
- Source:
If the Cancellation Token is cancelled. Starts off as false.
Methods
(package) add(timeoutID, resolve)
- Source:
Registers the given timeout ID and Promise resolve function.
Parameters:
Name | Type | Description |
---|---|---|
timeoutID |
Timeout ID, the result of calling setTimeout, platform dependent. |
|
resolve |
function | Resolve function for a Promise to be called if the timeout is cancelled. |
cancel()
- Source:
Cancels all registered timeouts. Sets isCancelled to true. Cancellation means calling clearTimeout with the stored timeout IDs and calling the related resolve functions.
(package) del(timeoutID)
- Source:
Unregisters the given timeout ID, when the timeout is reached and does not need to be cancelled anymore, or if it was cancelled.
Parameters:
Name | Type | Description |
---|---|---|
timeoutID |
Timeout ID to unregister. |