()
| 533 | this.#queue.enqueue(run, options); |
| 534 | |
| 535 | const removeQueuedTask = () => { |
| 536 | if (this.#queue instanceof PriorityQueue) { |
| 537 | this.#queue.remove(run); |
| 538 | return; |
| 539 | } |
| 540 | |
| 541 | this.#queue.remove?.(options.id!); // Intentionally best-effort: queued abort removal is only supported for queue classes that implement `.remove()`. |
| 542 | }; |
| 543 | |
| 544 | // Handle abort while task is waiting in the queue |
| 545 | if (options.signal) { |