TxReentrantLock17
Constructors
Models
Guards
Getters
lockedconstChecks whether the lock is held by any fiber (read or write).readLockedconstChecks whether any fiber holds a read lock.readLocksconstReturns the total number of read locks held across all fibers.writeLockedconstChecks whether any fiber holds a write lock.writeLocksconstReturns the number of write locks held (0 or the reentrant count).Mutations
acquireReadconstAcquires a read lock.acquireWriteconstAcquires the write lock for the current fiber.readLockconstAcquires a read lock for the duration of the scope.releaseReadconstReleases one read lock held by the current fiber.releaseWriteconstReleases one write lock held by the current fiber.withLockconstRuns an effect while holding a write lock.withReadLockconstRuns the provided effect while holding a read lock.withWriteLockconstRuns the provided effect while holding a write lock.writeLockconstAcquires a write lock for the duration of the scope.