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

Class RecursiveLock

tests/soft/read_write/test_lock_singleton.py:124–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

122 recurse = True
123
124 class RecursiveLock(SoftReadWriteLock):
125 def __init__(self, *args: Any, **kwargs: Any) -> None: # ruff:ignore[any-type] # forwards the public constructor unchanged
126 if recurse:
127 RecursiveLock(lock_file)
128 super().__init__(*args, **kwargs)
129
130 with pytest.raises(RuntimeError, match="Singleton lock construction is already active"):
131 RecursiveLock(lock_file)

Calls

no outgoing calls