dieumercimvemba's picture
download
raw
855 Bytes
import SemaphoreInterface from './SemaphoreInterface';
declare class Semaphore implements SemaphoreInterface {
private _value;
private _cancelError;
constructor(_value: number, _cancelError?: Error);
acquire(weight?: number, priority?: number): Promise<[number, SemaphoreInterface.Releaser]>;
runExclusive<T>(callback: SemaphoreInterface.Worker<T>, weight?: number, priority?: number): Promise<T>;
waitForUnlock(weight?: number, priority?: number): Promise<void>;
isLocked(): boolean;
getValue(): number;
setValue(value: number): void;
release(weight?: number): void;
cancel(): void;
private _dispatchQueue;
private _dispatchItem;
private _newReleaser;
private _drainUnlockWaiters;
private _couldLockImmediately;
private _queue;
private _weightedWaiters;
}
export default Semaphore;

Xet Storage Details

Size:
855 Bytes
·
Xet hash:
31fbe4632799c3721cb732c8aa3af161ec54bfa1a480fe2eec5281ecb9121382

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.