annotations-design-patterns
    Preparing search index...

    Interface SemaphoreOptions<This, Args>

    interface SemaphoreOptions<This, Args extends readonly unknown[]> {
        permits: number;
        key?: (context: SemaphoreKeyContext<This, Args>) => PropertyKey;
        maxQueue?: number;
    }

    Type Parameters

    • This
    • Args extends readonly unknown[]
    Index
    permits: number
    key?: (context: SemaphoreKeyContext<This, Args>) => PropertyKey

    Optional partition resolver. An invocation's explicit key takes precedence.

    maxQueue?: number

    Waiting calls per partition; active holders do not count. Omitted is unbounded.