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

Function acquireHandle

packages/core/src/util/effect-flock.ts:221–228  ·  view source on GitHub ↗
(lockfile: string, key: string)

Source from the content-addressed store, hash-verified

219 // -- retry wrapper (preserves Handle type) --
220
221 const acquireHandle = (lockfile: string, key: string): Effect.Effect<Handle, LockError> =>
222 tryAcquireLockDir(lockfile, key).pipe(
223 Effect.retry({
224 while: (err) => err._tag === "NotAcquired",
225 schedule: retrySchedule,
226 }),
227 Effect.catchTag("NotAcquired", () => Effect.fail(new LockTimeoutError({ key }))),
228 )
229
230 // -- release --
231

Callers 1

effect-flock.tsFile · 0.85

Calls 1

tryAcquireLockDirFunction · 0.70

Tested by

no test coverage detected