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

Class AioFileLock

tests/test_async_filelock.py:182–191  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

180 acquired = released = False
181
182 class AioFileLock(BaseAsyncFileLock):
183 async def _acquire(self) -> None: # ty: ignore[invalid-method-override]
184 nonlocal acquired
185 acquired = True
186 self._context.lock_file_fd = 1
187
188 async def _release(self) -> None: # ty: ignore[invalid-method-override]
189 nonlocal released
190 released = True
191 self._context.lock_file_fd = None
192
193 lock = AioFileLock(str(tmp_path / "a"))
194 await lock.acquire()

Callers 1

test_coroutine_functionFunction · 0.85

Calls

no outgoing calls

Tested by 1

test_coroutine_functionFunction · 0.68