@dusrel/image API
    Preparing search index...

    Interface BatchOptions<TIn>

    interface BatchOptions<TIn> {
        concurrency?: number;
        continueOnError?: boolean;
        controller?: BatchControllerLike;
        itemTimeoutMs?: number;
        maxInFlightBytes?: number;
        onProgress?: (progress: BatchProgress) => void;
        retries?: number;
        retryDelayMs?: number;
        signal?: AbortSignal;
        sizeOf?: (item: TIn) => number;
    }

    Type Parameters

    • TIn
    Index
    concurrency?: number

    Parallel task lanes. Default 2 (matches @dusrel/image's processBatch).

    continueOnError?: boolean

    Default true: failures become rejected results. False: the first failure rejects the whole run.

    controller?: BatchControllerLike

    Pause/resume + cancellation control (takes precedence over signal composition — both are honoured).

    itemTimeoutMs?: number

    Per-attempt timeout in ms. Default: none.

    maxInFlightBytes?: number

    Memory safeguard: never let the summed sizeOf() of in-flight items exceed this budget. A single item larger than the budget still runs (alone) — the safeguard throttles, it never deadlocks.

    onProgress?: (progress: BatchProgress) => void
    retries?: number

    Per-item retries after a failure. Default 0.

    retryDelayMs?: number

    Delay between retries in ms. Default 0.

    signal?: AbortSignal

    External cancellation.

    sizeOf?: (item: TIn) => number

    Item weight estimator for the memory safeguard.