MCPcopy Create free account
hub / github.com/VectifyAI/OpenKB / _local_lock

Function _local_lock

openkb/locks.py:92–99  ·  view source on GitHub ↗
(lock_path: Path)

Source from the content-addressed store, hash-verified

90
91
92def _local_lock(lock_path: Path) -> _LocalRwLock:
93 resolved = lock_path.resolve()
94 with _LOCKS_GUARD:
95 lock = _LOCAL_LOCKS.get(resolved)
96 if lock is None:
97 lock = _LocalRwLock()
98 _LOCAL_LOCKS[resolved] = lock
99 return lock
100
101
102def _drain_pending_journals(openkb_dir: Path) -> None:

Callers 1

kb_lockFunction · 0.85

Calls 2

_LocalRwLockClass · 0.85
getMethod · 0.45

Tested by

no test coverage detected