MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / release

Method release

src/utils.ts:592–604  ·  view source on GitHub ↗

* Release the lock

()

Source from the content-addressed store, hash-verified

590 * Release the lock
591 */
592 release(): void {
593 if (!this.held) return;
594 try {
595 // Only remove if we still own it (check PID)
596 const content = fs.readFileSync(this.lockPath, 'utf-8').trim();
597 if (parseInt(content, 10) === process.pid) {
598 fs.unlinkSync(this.lockPath);
599 }
600 } catch {
601 // Lock file already gone - that's fine
602 }
603 this.held = false;
604 }
605
606 /**
607 * Execute a function while holding the lock

Callers 3

tryAcquireMethod · 0.95
withLockMethod · 0.95
withLockAsyncMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected