filestream-ts / node_modules /async-mutex /lib /MutexInterface.d.ts
vickydmt's picture
Upload folder using huggingface_hub
1fa8efd verified
interface MutexInterface {
acquire(): Promise<MutexInterface.Releaser>;
runExclusive<T>(callback: MutexInterface.Worker<T>): Promise<T>;
waitForUnlock(): Promise<void>;
isLocked(): boolean;
/** @deprecated Deprecated in 0.3.0, will be removed in 0.4.0. Use runExclusive instead. */
release(): void;
cancel(): void;
}
declare namespace MutexInterface {
interface Releaser {
(): void;
}
interface Worker<T> {
(): Promise<T> | T;
}
}
export default MutexInterface;