@bluelibs/runner - v5.5.0
    Preparing search index...

    Class Queue

    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.

    Index

    Constructors

    Methods

    Constructors

    Methods

    • Disposes the queue.

      Parameters

      • options: { cancel?: boolean } = {}
        • Optionalcancel?: boolean

          – if true, broadcasts AbortSignal to running task. default: false (waits for tasks to finish).

      Returns Promise<void>

    • Schedule an asynchronous task.

      Type Parameters

      • T

      Parameters

      • task: (signal: AbortSignal) => Promise<T>

        – receives an AbortSignal so it can cancel early if desired.

      Returns Promise<T>