wickr-bedrock-bot
Version:
AWS Wickr's own Bedrock Bot
13 lines (12 loc) • 454 B
TypeScript
import MutexInterface from './MutexInterface';
declare class Mutex implements MutexInterface {
constructor(cancelError?: Error);
acquire(priority?: number): Promise<MutexInterface.Releaser>;
runExclusive<T>(callback: MutexInterface.Worker<T>, priority?: number): Promise<T>;
isLocked(): boolean;
waitForUnlock(priority?: number): Promise<void>;
release(): void;
cancel(): void;
private _semaphore;
}
export default Mutex;