MCPcopy
hub / github.com/colbymchenry/codegraph / release

Method release

src/utils.ts:284–296  ·  view source on GitHub ↗

* Release the lock

()

Source from the content-addressed store, hash-verified

282 * Release the lock
283 */
284 release(): void {
285 if (!this.held) return;
286 try {
287 // Only remove if we still own it (check PID)
288 const content = fs.readFileSync(this.lockPath, 'utf-8').trim();
289 if (parseInt(content, 10) === process.pid) {
290 fs.unlinkSync(this.lockPath);
291 }
292 } catch {
293 // Lock file already gone - that's fine
294 }
295 this.held = false;
296 }
297
298 /**
299 * Execute a function while holding the lock

Callers 7

withLockMethod · 0.95
withLockAsyncMethod · 0.95
closeMethod · 0.80
indexAllMethod · 0.80
indexFilesMethod · 0.80
syncMethod · 0.80
security.test.tsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected