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