Context of applying for async handlers
Map for task identifiers
The lock status. If true, then all new tasks won't be registered.
Set of used async namespaces
Cache for initialized workers
Map of namespaces for async operations
Link to Async.namespaces
Wrapper for globalThis.cancelIdleCallback
Clears the specified "requestIdleCallback" timer or a group of timers
options for the operation
Cancels the specified iterable object.
Notice that cancellation affects only objects that have already been activated by invoking the next
method.
So, for example, canceled iterable will throw an error on the next invoking of next
.
Cancels the specified iterable or a group of iterable.
Notice that cancellation affects only objects that have already been activated by invoking the next
method.
So, for example, canceled iterable will throw an error on the next invoking of next
.
options for the operation
Cancels the specified promise. The canceled promise will be automatically rejected.
Cancels the specified promise or a group of promises. The canceled promises will be automatically rejected.
options for the operation
Cancels the specified proxy function
Cancels the specified proxy function or a group of functions
options for the operation
Cancels the specified request. The canceled promise will be automatically rejected.
Cancels the specified request or a group of requests. The canceled promises will be automatically rejected.
options for the operation
Cancels a task (or a group of tasks) from the specified namespace
operation options or task link
Clears all async tasks
Wrapper for globalThis.cancelIdleCallback
Clears the specified "requestIdleCallback" timer or a group of timers
options for the operation
Wrapper for globalThis.clearImmediate
Clears the specified "setImmediate" timer or a group of timers
options for the operation
Wrapper for globalThis.clearInterval
Clears the specified "setInterval" timer or a group of timers
options for the operation
Cancels the specified iterable object.
Notice that cancellation affects only objects that have already been activated by invoking the next
method.
So, for example, canceled iterable will throw an error on the next invoking of next
.
Cancels the specified iterable object.
Notice that cancellation affects only objects that have already been activated by invoking the next
method.
So, for example, canceled iterable will throw an error on the next invoking of next
.
options for the operation
Cancels the specified promise. The canceled promise will be automatically rejected.
Cancels the specified promise or a group of promises. The canceled promises will be automatically rejected.
options for the operation
Cancels the specified proxy function
Cancels the specified proxy function or a group of functions
options for the operation
Cancels the specified request. The canceled promise will be automatically rejected.
Cancels the specified request or a group of requests. The canceled promises will be automatically rejected.
options for the operation
Wrapper for globalThis.clearTimeout
Clears the specified "setTimeout" timer or a group of timers
options for the operation
Terminates the specified worker
Terminates the specified worker or a group of workers
options for the operation
Returns a new function that allows invoking the passed function only with the specified delay. The next invocation of the function will cancel the previous.
Returns an iterator from the passed iterable object. Notice, an asynchronous iterator has more priority.
Returns a cache object by the specified name
Returns a promise that will be resolved on the process idle
Creates a new asynchronous iterable object from the specified iterable and returns it.
If the passed iterable doesn't have Symbol.asyncIterator
, it will be created from a synchronous object iterator
(the synchronous iterator will also be preserved).
Notice, until the created promise object isn't executed by invoking the next
method,
any async operations won't be registered.
Marks all async tasks from the namespace by the specified label
operation options
Marks a promise with the specified label
Marks a promise or group of promises with the specified label
additional options
Marks a task (or a group of tasks) from the namespace by the specified label
operation options or a link to the task
Mutes all async tasks
Mutes the specified "requestIdleCallback" timer
Mutes the specified "requestIdleCallback" timer or a group of timers
options for the operation
Mutes the specified "setImmediate" timer
Mutes the specified "setImmediate" timer or a group of timers
options for the operation
Mutes the specified "setInterval" timer
Mutes the specified "setInterval" timer or a group of timers
options for the operation
Mutes the specified iterable object.
Elements that are consumed during the object is muted will be ignored.
Notice that muting affects only objects that have already been activated by invoking the next
method.
Mutes the specified iterable object or a group of iterable objects.
Elements, that are consumed during the object is muted will be ignored.
Notice that muting affects only objects that have already been activated by invoking the next
method.
options for the operation
Mutes the specified promise. If the promise is resolved during it muted, the promise wrapper will be rejected.
Mutes the specified promise or a group of promises. If the promises are resolved during muted, the promise wrappers will be rejected.
options for the operation
Mutes the specified proxy function
Mutes the specified proxy function or a group of functions
options for the operation
Mutes the specified request. If the request is resolved during it muted, the promise wrapper will be rejected.
Mutes the specified request or a group of requests. If the requests are resolved during muted, the promise wrappers will be rejected.
options for the operation
Mutes the specified "setTimeout" timer
Mutes the specified "setTimeout" timer or a group of timers
options for the operation
Returns a promise that will be resolved on the next tick of the event loop
Factory to create promise clear handlers
Factory to create promise merge handlers
Creates a new promise that wraps the passed promise and returns it.
This method doesn't attach any hook or listeners to the object, but if we cancel the operation by using one of Async's methods, like, "cancelPromise", the promise will be rejected.
The promise can be provided as it is or as a function, that returns a promise.
Terminates the specified promise
name of the destructor method
Creates a new function that wraps the original and returns it.
This method doesn't attach any hook or listeners to the object,
but if we cancel the operation by using one of Async's methods, like, cancelProxy
,
the target function won't be invoked.
Registers the specified async task
Creates a promise that wraps the passed request and returns it.
This method doesn't attach any hook or listeners to the object, but if we cancel the operation by using one of Async's methods, like, "cancelRequest", the promise will be rejected.
The request can be provided as a promise or function, that returns a promise.
Notice, the method uses Async.promise
, but with a different namespace: request
instead of promise
.
Wrapper for globalThis.requestIdleCallback
callback function
Wrapper for globalThis.setImmediate
callback function
Wrapper for globalThis.setInterval
callback function
timer value
Wrapper for globalThis.setTimeout
callback function
timeout value
Returns a promise that will be resolved after the specified timeout
Suspends all async tasks
Suspends the specified "requestIdleCallback" timer
Suspends the specified "requestIdleCallback" timer or a group of timers
options for the operation
Suspends the specified "setImmediate" timer
Suspends the specified "setImmediate" timer or a group of timers
options for the operation
Suspends the specified "setInterval" timer
Suspends the specified "setInterval" timer or a group of timers
options for the operation
Suspends the specified iterable object.
Notice that suspending affects only objects that have already been activated by invoking the next
method.
Suspends the specified iterable or a group of iterable objects.
Notice that suspending affects only objects that have already been activated by invoking the next
method.
options for the operation
Suspends the specified promise
Suspends the specified promise or a group of promises
options for the operation
Suspends the specified proxy function
Suspends the specified proxy function or a group of functions
options for the operation
Suspends the specified request
Suspends the specified request or a group of requests
options for the operation
Suspends the specified "setTimeout" timer
Suspends the specified "setTimeout" timer or a group of timers
options for the operation
Terminates the specified worker
Terminates the specified worker or a group of workers
options for the operation
Returns a new function that allows invoking the passed function not more often than the specified delay
Unmutes all async tasks
Unmutes the specified "requestIdleCallback" timer
Unmutes the specified "requestIdleCallback" timer or a group of timers
options for the operation
Unmutes the specified "setImmediate" timer
Unmutes the specified "setImmediate" timer or a group of timers
options for the operation
Unmutes the specified "setInterval" timer
Unmutes the specified "setInterval" timer or a group of timers
options for the operation
Unmutes the specified iterable object
Unmutes the specified iterable function or a group of iterable objects
options for the operation
Unmutes the specified promise
Unmutes the specified promise or a group of promises
options for the operation
Unmutes the specified proxy function
Unmutes the specified proxy function or a group of functions
options for the operation
Unmutes the specified request
Unmutes the specified request or a group of requests
options for the operation
Unmutes the specified "setTimeout" timer
Unmutes the specified "setTimeout" timer or a group of timers
options for the operation
Unsuspends all async tasks
Unsuspends the specified "requestIdleCallback" timer
Unsuspends the specified "requestIdleCallback" timer or a group of timers
options for the operation
Unsuspends the specified "setImmediate" timer
Unsuspends the specified "setImmediate" timer or a group of timers
options for the operation
Unsuspends the specified "setImmediate" timer
Unsuspends the specified "setImmediate" timer or a group of timers
options for the operation
Unsuspends the specified iterable object
Unsuspends the specified iterable or a group of iterable objects
options for the operation
Unsuspends the specified promise
Unsuspends the specified promise or a group of promises
options for the operation
Unsuspends the specified proxy function
Unsuspends the specified proxy function or a group of functions
options for the operation
Unsuspends the specified request
Unsuspends the specified request or a group of requests
options for the operation
Unsuspends the specified "setTimeout" timer
Unsuspends the specified "setTimeout" timer or a group of names
options for the operation
Returns a promise that will be resolved only when the specified function returns a positive value (== true)
Wraps the specified worker object.
This method doesn't attach any hook or listeners to the object,
but every time the same object is registered, Async will increment the number of links that relate to this object.
After, when we try to destroy the worker by using one of Async's methods, like, terminateWorker
,
it will de-increment values of links. When the number of links is equal to zero,
Async will try to call a "real" object destructor by using one of the possible destructor methods from
the whitelist or by the specified destructor name, also if the worker is a function,
it is interpreted as the destructor.
Terminates the specified worker
name of the destructor method
Cache for async operations