@vgerbot/async
    Preparing search index...

    Interface QueueOptions

    Configuration for queue().

    interface QueueOptions {
        concurrency?: number;
        fallback?: unknown;
        name?: string;
        onCancel?: (error: CancelError) => void | Promise<void>;
        onRetry?: (
            info: {
                attempt: number;
                error: Error;
                maxAttempts: number;
                waitMs: number;
            },
        ) => void
        | Promise<void>;
        retry?: RetryOptions;
        signal?: AbortSignal;
        startPaused?: boolean;
        timeout?: number;
    }

    Hierarchy (View Summary)

    Index

    Properties

    concurrency?: number

    Maximum number of concurrently running workers. Values less than 1 are clamped to 1.

    fallback?: unknown

    Fallback value/provider used when the task rejects. Receives the original error and whether it was caused by cancellation.

    name?: string

    Optional name for tracing and diagnostics

    onCancel?: (error: CancelError) => void | Promise<void>

    Callback invoked when the task is cancelled. Receives the resolved CancelError.

    onRetry?: (
        info: {
            attempt: number;
            error: Error;
            maxAttempts: number;
            waitMs: number;
        },
    ) => void
    | Promise<void>

    Callback invoked right before waiting for a retry attempt.

    retry?: RetryOptions

    Retry configuration for the task

    signal?: AbortSignal

    Optional external abort signal. Aborting it cancels the queue.

    startPaused?: boolean

    If true, the queue starts in paused mode and will not process tasks until resume() is called.

    timeout?: number

    Timeout in milliseconds. The task will be automatically cancelled after this duration, with the cancel reason set to a string in the form "{label} timeout after {timeout}ms".