True after cancellation has been requested.
True when there is no runner and no pending work.
True when processing is paused.
True when the queue is actively processing tasks.
Captured error from the last failed task when pause-on-error is enabled.
Number of tasks waiting to be processed.
Current processing status of the queue.
Enqueues a task to run next (ahead of other pending tasks) without preempting the current task.
Enqueues a new task and starts processing if idle, resurrecting a cancelled queue.
When a dedupeKey is provided, the queue skips enqueueing if the last pending task (or the currently running task when no tasks are pending) has the same key. This keeps only adjacent duplicates out of the queue while leaving non-adjacent repeats untouched.
Async task function to run in-order when it reaches the front of the queue.
OptionaldedupeKey: stringOptional identifier used to dedupe adjacent tasks with the same key.
Cancels all pending work, clears the queue, and prevents further status flips from stale runners.
Clears the stored lastTaskError value.
Removes all pending tasks without altering status when processing or paused.
Pauses processing after the current task completes.
Resumes processing, clearing any stored error when leaving a paused state.
Creates a queue with optional status notification callback and error pausing behavior.