Crypto Lib
    Preparing search index...

    Interface WorkerPoolOptions

    Configuration options for the worker thread pool.

    interface WorkerPoolOptions {
        size?: number;
        workerScript?: string;
        maxQueue?: number;
        taskTimeoutMs?: number;
        resourceLimits?: ResourceLimits;
    }
    Index
    size?: number

    Number of worker threads. Default: Math.max(1, cpus / 2).

    workerScript?: string

    Path to the worker script. Default: built-in generic executor.

    maxQueue?: number

    Tasks that may wait for a worker; further tasks are rejected with WorkerPoolBusyError. Default: unbounded.

    taskTimeoutMs?: number

    Milliseconds a task may run before it is rejected with WorkerTaskTimeoutError and its worker replaced. The clock starts once the worker is running, so a fresh worker's start-up does not count. Default: none.

    resourceLimits?: ResourceLimits

    Resource limits for each worker thread (heap sizes, stack size).