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

Function try_downgrade_lock

tests/test_read_write.py:273–279  ·  view source on GitHub ↗
(lock_file: str, downgrade_result: Synchronized[int])

Source from the content-addressed store, hash-verified

271
272
273def try_downgrade_lock(lock_file: str, downgrade_result: Synchronized[int]) -> None:
274 lock = ReadWriteLock(lock_file)
275 with lock.write_lock():
276 try:
277 lock.acquire_read()
278 except RuntimeError:
279 downgrade_result.value = 0
280
281
282@pytest.mark.timeout(10)

Callers

nothing calls this directly

Calls 3

write_lockMethod · 0.95
acquire_readMethod · 0.95
ReadWriteLockClass · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…