Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Mutex

Package version

An async mutex lock.

export
class

Mutex

Hierarchy

  • Mutex

Index

Methods

Methods

Static lock

  • lock(key: string): Promise<void>
  • Lock for a specific key. If the lock has been acquired by another customer, then will wait until getting the lock.

    static
    memberof

    Mutex

    Parameters

    • key: string

      lock key

    Returns Promise<void>

Static unlock

  • unlock(key: string): Promise<void>

Generated using TypeDoc