Number of pending promises.
Size of the queue.
Returns the promise returned by calling fn.
Promise-returning/async function.
Same as .add(), but accepts an array of async functions and returns a promise that resolves when all async functions are resolved.
Clear the queue.
Returns a promise that settles when the queue becomes empty. Can be called multiple times. Useful if you for example add additional items at a later time.
Returns a promise that settles when the queue becomes empty, and all promises have completed; queue.size === 0 && queue.pending === 0. The difference with .onEmpty is that .onIdle guarantees that all work from the queue has finished. .onEmpty merely signals that the queue is empty, but it could mean that some promises haven't completed yet.
Put queue execution on hold.
Start (or resume) executing enqueued tasks within concurrency limit. No need to call this if queue is not paused (via options.autoStart = false or by .pause() method.)
Generated using TypeDoc
Whether the queue is currently paused.