Cooperative task queue. • Tasks run one‑after‑another (FIFO ordering). • Dead‑lock detection prevents nesting. • dispose() drains or cancels outstanding tasks, then rejects new ones.
Disposes the queue.
Optional
– if true, broadcasts AbortSignal to running task. default: false (waits for tasks to finish).
Schedule an asynchronous task.
– receives an AbortSignal so it can cancel early if desired.
Cooperative task queue. • Tasks run one‑after‑another (FIFO ordering). • Dead‑lock detection prevents nesting. • dispose() drains or cancels outstanding tasks, then rejects new ones.