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

Function _write_intent_pending

tests/test_read_write.py:552–560  ·  view source on GitHub ↗
(prober: ReadWriteLock, deadline: float)

Source from the content-addressed store, hash-verified

550
551
552def _write_intent_pending(prober: ReadWriteLock, deadline: float) -> bool:
553 try:
554 prober.acquire_read(blocking=False)
555 except Timeout:
556 return False
557 prober.release()
558 assert time.monotonic() < deadline, "Writer never registered its write intent"
559 time.sleep(0.05)
560 return True
561
562
563def chain_reader(

Callers 1

Calls 2

acquire_readMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected