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

Method _run_internal_method

src/filelock/asyncio.py:324–330  ·  view source on GitHub ↗
(self, method: Callable[[], Any])

Source from the content-addressed store, hash-verified

322 _LOGGER.debug("Lock %s released on %s", lock_id, lock_filename)
323
324 async def _run_internal_method(self, method: Callable[[], Any]) -> None:
325 if iscoroutinefunction(method):
326 await method()
327 elif self.run_in_executor:
328 await asyncio.get_running_loop().run_in_executor(self.executor, method)
329 else:
330 method()
331
332 def __enter__(self) -> NoReturn:
333 """Sync context manager entry is not supported because lock acquisition is a coroutine."""

Callers 2

releaseMethod · 0.95

Calls 1

run_in_executorMethod · 0.80

Tested by

no test coverage detected