ReadonlyidleTrue when both length and running are zero.
ReadonlylengthNumber of queued tasks waiting to be processed.
ReadonlypausedTrue when scheduling is paused.
ReadonlyrunningNumber of tasks currently executing.
Cancels the queue with an optional reason.
Optionalreason: unknownReturns true if the queue has been cancelled.
Resolves when queued task count becomes zero (running tasks may still exist).
Resolves with the next task execution error.
Resolves when the queue becomes idle (no pending and no running tasks). If already idle, resolves immediately.
Resolves when running task count reaches configured concurrency.
Resolves when queued task count becomes less than the provided threshold.
Pauses scheduling new tasks (running tasks continue).
Resumes scheduling after pause().
Concurrency-limited async task queue.
The queue accepts tasks (
push) and processes them with the configured worker while respectingconcurrency. It supports pause/resume, cancellation, and idle notifications.Cancellation semantics:
CancelError.