| 411 | |
| 412 | |
| 413 | class _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. |
no outgoing calls
no test coverage detected
searching dependent graphs…