MCPcopy Index your code
hub / github.com/python/cpython / _ModuleLockManager

Class _ModuleLockManager

Lib/importlib/_bootstrap.py:413–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

411
412
413class _ModuleLockManager:
414
415 def __init__(self, name):
416 self._name = name
417 self._lock = None
418
419 def __enter__(self):
420 self._lock = _get_module_lock(self._name)
421 self._lock.acquire()
422
423 def __exit__(self, *args, **kwargs):
424 self._lock.release()
425
426
427# The following two functions are for consumption by Python/import.c.

Callers 3

_execFunction · 0.85
_loadFunction · 0.85
_find_and_loadFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…