hamok
Version:
Lightweight Distributed Object Storage on RAFT consensus algorithm
14 lines • 521 B
TypeScript
export declare class WaitingQueue {
readonly timeoutInMs: number;
readonly onCompleted?: (() => void) | undefined;
private _queue;
private _timer?;
private _completed;
constructor(timeoutInMs: number, onCompleted?: (() => void) | undefined, timeoutReason?: string);
get completed(): boolean;
wait<T = unknown>(supplier: () => Promise<T>): Promise<T>;
add(action: () => void): void;
flush(): void;
clear(rejectReason?: string): void;
}
//# sourceMappingURL=WaitingQueue.d.ts.map