Constructors

Methods

Constructors

Methods

  • An async function that waits to acquire the lock, then provides a function to unlock. Use like: const unlockingFunction = await promiseChainLock.acquireLock(); try { // Do some stuff. } finally { unlockingFunction(); }

    Returns Promise<CallBack>

    a promise that resolves when the lock has been acquired, resolving to a cb to unlock it.