MCPcopy Create free account
hub / github.com/anomalyco/opencode / withTargetLock

Function withTargetLock

packages/core/src/file-mutation.ts:80–82  ·  view source on GitHub ↗
(target: Target)

Source from the content-addressed store, hash-verified

78 const locks = KeyedMutex.makeUnsafe<string>()
79 const withTargetLock =
80 (target: Target) =>
81 <A, E, R>(effect: Effect.Effect<A, E, R>) =>
82 locks.withLock(target.canonical)(Effect.uninterruptible(effect))
83
84 const writeResult = (target: Target, existed: boolean): WriteResult => ({
85 operation: "write",

Callers 1

file-mutation.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected