interface WriteLock {
    downgradeToReadLock(): ReadLock;
    isHeld(): boolean;
    release(): void;
}

Methods

  • Downgrades the write lock to a read lock. This downgrade will be effective immediately.

    Returns ReadLock

    The acquired read lock.

    Throws

    If the write lock is no longer held.

  • Returns boolean

    true if this write lock is still held, or false otherwise.

  • Releases the write lock.

    Returns void

    Throws

    If the write lock is no longer held.