MCPcopy Create free account
hub / github.com/Effect-TS/effect / makeReadLock

Function makeReadLock

packages/effect/src/internal/stm/tReentrantLock.ts:121–126  ·  view source on GitHub ↗
(fiberId: FiberId.FiberId, count: number)

Source from the content-addressed store, hash-verified

119 * number of read locks.
120 */
121const makeReadLock = (fiberId: FiberId.FiberId, count: number): ReadLock => {
122 if (count <= 0) {
123 return emptyReadLock
124 }
125 return new ReadLock(HashMap.make([fiberId, count]))
126}
127
128/**
129 * Determines if there is no other holder of read locks aside from the

Callers 1

releaseWriteFunction · 0.85

Calls 1

makeMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…