MCPcopy Create free account
hub / github.com/arctic-cli/interface / withWorktreeLock

Function withWorktreeLock

packages/arctic/src/session/benchmark.ts:211–214  ·  view source on GitHub ↗
(fn: () => Promise<T>)

Source from the content-addressed store, hash-verified

209 }
210
211 export async function withWorktreeLock<T>(fn: () => Promise<T>) {
212 using _ = await Lock.write(LOCK_KEY)
213 return fn()
214 }
215
216 /**
217 * Apply a child benchmark session's changes to the workspace.

Callers 2

applyFunction · 0.85
undoFunction · 0.85

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected