@bluelibs/runner - v6.8.0
    Preparing search index...

    Interface ConcurrencyMiddlewareConfig

    Running-work and admission policy for a shared concurrency pool.

    interface ConcurrencyMiddlewareConfig {
        coordination?: MiddlewareCoordination;
        identityScope?: IdentityScopeConfig;
        key?: string;
        keyBuilder?: MiddlewareKeyBuilder;
        limit?: number;
        maxQueue?: number;
        semaphore?: Semaphore;
        waitTimeoutMs?: number;
    }

    Hierarchy (View Summary)

    Index
    coordination?: MiddlewareCoordination

    Omitted adopts registered resilience, otherwise uses memory. Local always uses memory; distributed requires resilience.

    identityScope?: IdentityScopeConfig

    Controls identity partitioning for middleware-managed state.

    Omit this option to use automatic tenant partitioning when identity exists.

    key?: string

    Optional key to identify a shared semaphore. If provided, the semaphore will be shared across all tasks using the same key.

    keyBuilder?: MiddlewareKeyBuilder

    Dynamic shared pool name. Receives the canonical task id and input; mutually exclusive with key.

    limit?: number

    Maximum number of concurrent executions. If provided, a Semaphore will be created and shared for this config object.

    maxQueue?: number

    Maximum waiting calls per resolved pool per runtime. Omitted means unlimited; zero disables waiting.

    semaphore?: Semaphore

    An existing Semaphore instance to use. Implies local coordination.

    waitTimeoutMs?: number

    Maximum acquisition wait in milliseconds. Omitted means unlimited; zero makes one immediate attempt.