You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

10 lines
272 B

export declare class Semaphore<T = void> {
private _capacity;
private _active;
private _waiting;
constructor(capacity?: number);
lock(thunk: () => T | PromiseLike<T>): Promise<T>;
get active(): number;
private runNext;
private doRunNext;
}