Hermes MySQL
    Preparing search index...

    Type Alias Mutex

    type Mutex = {
        lock(signal?: AbortSignal): Promise<void>;
        stillHeld(): Promise<boolean>;
        tryLock(): Promise<boolean>;
        unlock(): Promise<void>;
    }
    Index
    • Waits until it takes the lock, trying every retryEvery. Rejects with AbortError when signal aborts.

      Parameters

      • Optionalsignal: AbortSignal

      Returns Promise<void>

    • Whether this instance still holds the lock: false once its connection was lost, e.g. after a failover.

      Returns Promise<boolean>

    • Releases the lock and closes the connection. Does nothing when the lock is not held.

      Returns Promise<void>