@chickenjdk/byteutils
    Preparing search index...

    Class LockQueue

    Index

    Constructors

    Accessors

    Methods

    Constructors

    Accessors

    • get closed(): boolean

      If the queue is closed

      Returns boolean

    Methods

    • Acquire the lock

      Returns Promise<void>

      A promise that resolves when you have the lock, or rejects when the queue is closed

    • Throw an error on all functions waiting for the lock, and throw another whenever an acquisition is attempted

      Parameters

      • error: Error

        The error to be thrown for all waiting for the lock

      • acquireError: Error

        The error to throw whenever anyone tries to acquire the lock

      Returns void

    • Release the lock

      Returns void