Class WrappedExpiringReadWriteLocker

Wraps around an existing ReadWriteLocker and adds expiration logic to prevent locks from getting stuck.

Hierarchy

  • WrappedExpiringReadWriteLocker

Implements

Constructors

Properties

expiration: number
logger: Logger = ...

Methods

  • Creates a Promise that either resolves the given input function or rejects if time runs out, whichever happens first. The input function can reset the timer by calling the maintainLock function it receives. The ResourceIdentifier is only used for logging.

    Type Parameters

    • T

    Parameters

    Returns Promise<T>