MCPcopy Create free account
hub / github.com/tox-dev/filelock / __init__

Method __init__

tests/async_lock/test_finalization.py:156–160  ·  view source on GitHub ↗
(self, lock_file: Path, *, is_singleton: bool)

Source from the content-addressed store, hash-verified

154 # A constructor holds the cache lock while it takes the fork locks, inside which the collector can finalize a lock.
155 class StallingLock(AsyncSoftFileLock):
156 def __init__(self, lock_file: Path, *, is_singleton: bool) -> None:
157 super().__init__(lock_file, is_singleton=is_singleton, run_in_executor=False)
158 if next(constructions):
159 inside.set()
160 leave.wait()
161
162 constructions: Final[count[int]] = count()
163 inside: Final[threading.Event] = threading.Event()

Callers

nothing calls this directly

Calls 1

waitMethod · 0.80

Tested by

no test coverage detected