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

Class AioFileLock

tests/async_lock/test_backend_calls.py:55–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

53 acquired = released = False
54
55 class AioFileLock(BaseAsyncFileLock):
56 async def _acquire(self) -> None: # ty: ignore[incompatible-method-override] # coroutine backends are supported
57 nonlocal acquired
58 acquired = True
59 self._context.lock_file_fd = 1
60
61 async def _release(self) -> None: # ty: ignore[incompatible-method-override] # coroutine backends are supported
62 nonlocal released
63 released = True
64 self._context.lock_file_fd = None
65
66 lock = AioFileLock(str(tmp_path / "a"))
67 await lock.acquire()

Callers 1

test_coroutine_functionFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_coroutine_functionFunction · 0.68