MCPcopy Index your code
hub / github.com/Effect-TS/effect / writeLock

Function writeLock

packages/effect/src/internal/stm/tReentrantLock.ts:334–338  ·  view source on GitHub ↗
(self: TReentrantLock.TReentrantLock)

Source from the content-addressed store, hash-verified

332
333/** @internal */
334export const writeLock = (self: TReentrantLock.TReentrantLock): Effect.Effect<number, never, Scope.Scope> =>
335 Effect.acquireRelease(
336 core.commit(acquireWrite(self)),
337 () => core.commit(releaseWrite(self))
338 )
339
340/** @internal */
341export const writeLocked = (self: TReentrantLock.TReentrantLock): STM.STM<boolean> =>

Callers 1

lockFunction · 0.85

Calls 3

acquireWriteFunction · 0.85
releaseWriteFunction · 0.85
commitMethod · 0.45

Tested by

no test coverage detected