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

Function block_hook

tests/async_lock/test_executor.py:28–30  ·  view source on GitHub ↗
(_fd: int)

Source from the content-addressed store, hash-verified

26 cancellation_seen = threading.Event()
27
28 def block_hook(_fd: int) -> None:
29 hook_started.set()
30 assert finish_hook.wait(timeout=5)
31
32 lock = AsyncFileLock(tmp_path / "a", on_acquired=block_hook)
33 tasks: Queue[asyncio.Task[AsyncAcquireReturnProxy]] = Queue()

Callers

nothing calls this directly

Calls 1

waitMethod · 0.80

Tested by

no test coverage detected