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

Function lock

packages/core/test/util/effect-flock.test.ts:14–16  ·  view source on GitHub ↗
(dir: string, key: string)

Source from the content-addressed store, hash-verified

12import { Hash } from "@opencode-ai/core/util/hash"
13
14function lock(dir: string, key: string) {
15 return path.join(dir, Hash.fast(key) + ".lock")
16}
17
18function sleep(ms: number) {
19 return new Promise<void>((resolve) => setTimeout(resolve, ms))

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected