@apiratorjs/locking
Version:
A lightweight library providing both local and distributed locking primitives (mutexes and semaphores) for managing concurrency in Node.js.
14 lines • 669 B
TypeScript
import { Semaphore } from "../semaphore";
export declare const inMemoryDistributedSemaphoreRegistry: Map<string, Semaphore>;
export declare const inMemoryDistributedMutexRegistry: Map<string, Semaphore>;
export declare class InMemoryDistributedRegistry {
static listMutexNames(): string[];
static listSemaphoreNames(): string[];
static clearMutexRegistry(): void;
static clearSemaphoreRegistry(): void;
static hasMutex(name: string): boolean;
static hasSemaphore(name: string): boolean;
static getMutex(name: string): Semaphore;
static getSemaphore(name: string): Semaphore;
}
//# sourceMappingURL=in-memory-distributed-registry.d.ts.map