Package: effect
Module: TxReentrantLock
Checks whether any fiber holds a read lock.
Example (Checking whether a read lock is held)
import { Effect, TxReentrantLock } from "effect"
const program = Effect.gen(function*() {
const lock = yield* TxReentrantLock.make()
const isReadLocked = yield* TxReentrantLock.readLocked(lock)
console.log(isReadLocked) // false
})
Signature
declare const readLocked: (self: TxReentrantLock) => Effect.Effect<boolean>
Since v2.0.0