/** * Limit concurrent async operations within one process. * * Twin of python's `concurrency/limiter.py`, which wraps * `asyncio.Semaphore`. Node has no built-in semaphore, so the queue is * explicit -- but the two contracts match: a permit count below one is * rejected rather than clamped, and a release hands its permit straight * to the longest-waiting caller instead of returning it to the pool. * Handing off matters: returning it first would let a caller arriving in * the same tick barge ahead of the queue and drive the count negative. */ export declare class ConcurrencyLimiter { private available; private readonly waiters; constructor(maxConcurrency: number); /** * Take one permit, waiting for a free one, and return its release. * * The release is idempotent so a caller that unwinds twice (a `finally` * plus an explicit call) cannot inflate the permit count -- python gets * that from `async with` and the shape here has to supply it. */ acquire(): Promise<() => void>; private release; } //# sourceMappingURL=limiter.d.ts.map