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

Method _run

src/filelock/_async_read_write.py:269–279  ·  view source on GitHub ↗
(self, func: Callable[_P, _R], *args: _P.args, **kwargs: _P.kwargs)

Source from the content-addressed store, hash-verified

267 _future_result(acquire_future)
268
269 async def _run(self, func: Callable[_P, _R], *args: _P.args, **kwargs: _P.kwargs) -> _R:
270 future = self._submit(func, *args, **kwargs)
271 try:
272 await _wait_until_done(future)
273 except asyncio.CancelledError as cancellation:
274 try:
275 await _drain_future(future)
276 except BaseException as error: # ruff:ignore[blind-except] # reported with the cancellation below
277 _raise_cancelled_error(cancellation, error)
278 raise
279 return _future_result(future)
280
281 def _submit(
282 self, func: Callable[_P, _R], *args: _P.args, **kwargs: _P.kwargs

Callers 1

releaseMethod · 0.95

Calls 5

_submitMethod · 0.95
_wait_until_doneFunction · 0.85
_drain_futureFunction · 0.85
_raise_cancelled_errorFunction · 0.85
_future_resultFunction · 0.85

Tested by

no test coverage detected