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

Class AioFileLock

tests/test_async_filelock.py:164–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162 acquired = released = False
163
164 class AioFileLock(BaseAsyncFileLock):
165 async def _acquire(self) -> None: # type: ignore[override]
166 nonlocal acquired
167 acquired = True
168 self._context.lock_file_fd = 1
169
170 async def _release(self) -> None: # type: ignore[override]
171 nonlocal released
172 released = True
173 self._context.lock_file_fd = None
174
175 lock = AioFileLock(str(tmp_path / "a"))
176 await lock.acquire()

Callers 1

test_coroutine_functionFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_coroutine_functionFunction · 0.68