blob: f343f460304ae58957a513d5e456c7587ac8a855 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
export declare function createLock(count: number, promise?: PromiseConstructor): Semaphore<number>;
export declare class Semaphore<T = number> {
size: number;
private promise;
private waiting;
private locks;
private requestedLockCount;
private createDeferred;
constructor(size?: number, promise?: PromiseConstructor);
readonly count: number;
readonly pending: number;
acquire(arg?: T): Promise<T>;
release(): void;
}
|