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 Promise<void>
onIdle
onIdle(): Promise<void>
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.
Returns Promise<void>
pause
pause(): void
Put queue execution on hold.
Returns void
start
start(): void
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.)
Whether the queue is currently paused.