@push.rocks/smartproxy
Version:
A powerful proxy package with unified route-based configuration for high traffic management. Features include SSL/TLS support, flexible routing patterns, WebSocket handling, advanced security options, and automatic ACME certificate management.
20 lines (19 loc) • 386 B
TypeScript
/**
* Simple mutex implementation for async operations
*/
export declare class Mutex {
private isLocked;
private waitQueue;
/**
* Acquire the lock
*/
acquire(): Promise<void>;
/**
* Release the lock
*/
release(): void;
/**
* Run a function exclusively with the lock
*/
runExclusive<T>(fn: () => Promise<T>): Promise<T>;
}