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

Method release

src/utils.ts:616–628  ·  view source on GitHub ↗

* Release the lock

()

Source from the content-addressed store, hash-verified

614 * Release the lock
615 */
616 release(): void {
617 if (!this.held) return;
618 try {
619 // Only remove if we still own it (check PID)
620 const content = fs.readFileSync(this.lockPath, 'utf-8').trim();
621 if (parseInt(content, 10) === process.pid) {
622 fs.unlinkSync(this.lockPath);
623 }
624 } catch {
625 // Lock file already gone - that's fine
626 }
627 this.held = false;
628 }
629
630 /**
631 * 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