MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / release_cache_lock

Function release_cache_lock

tools/cache.py:53–61  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

51
52
53def release_cache_lock():
54 global acquired_count
55 acquired_count -= 1
56 assert acquired_count >= 0, "Called release more times than acquire"
57 if acquired_count == 0:
58 assert os.environ['EM_CACHE_IS_LOCKED'] == '1'
59 del os.environ['EM_CACHE_IS_LOCKED']
60 cachelock.release()
61 logger.debug(f'PID {os.getpid()} released multiprocess file lock to Emscripten cache at {cachedir}')
62
63
64@contextlib.contextmanager

Callers 1

lockFunction · 0.85

Calls 1

releaseMethod · 0.45

Tested by

no test coverage detected