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

Function hold_write

tests/sqlite/test_transactions.py:212–215  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

210 acquired = threading.Event()
211
212 def hold_write() -> None:
213 with holder_lock.write_lock():
214 acquired.set()
215 threading.Event().wait(timeout=2)
216
217 thread = threading.Thread(target=hold_write)
218 thread.start()

Callers

nothing calls this directly

Calls 2

waitMethod · 0.80
write_lockMethod · 0.45

Tested by

no test coverage detected