(self: TxReentrantLock)
| 581 | * @since 2.0.0 |
| 582 | */ |
| 583 | export const writeLocks = (self: TxReentrantLock): Effect.Effect<number> => |
| 584 | Effect.gen(function*() { |
| 585 | const state = yield* TxRef.get(self.stateRef) |
| 586 | return Option.isSome(state.writer) ? state.writer.value[1] : 0 |
| 587 | }) |
| 588 | |
| 589 | /** |
| 590 | * Checks whether the lock is held by any fiber (read or write). |