MCPcopy Index your code
hub / github.com/CodeClash-ai/CodeClash / _get_compute_lock

Method _get_compute_lock

codeclash/viewer/app.py:148–153  ·  view source on GitHub ↗

Get or create a lock for a specific cache key

(self, key: str)

Source from the content-addressed store, hash-verified

146 self._cache.clear()
147
148 def _get_compute_lock(self, key: str) -> threading.Lock:
149 """Get or create a lock for a specific cache key"""
150 with self._compute_locks_lock:
151 if key not in self._compute_locks:
152 self._compute_locks[key] = threading.Lock()
153 return self._compute_locks[key]
154
155 def _cleanup_compute_lock(self, key: str):
156 """Clean up compute lock after use to avoid memory leak"""

Callers 1

get_or_computeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected