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

Method submit

tests/async_lock/cancellation.py:88–96  ·  view source on GitHub ↗
(self, fn: Callable[_P, _T], /, *args: _P.args, **kwargs: _P.kwargs)

Source from the content-addressed store, hash-verified

86 self._after_call_ran = after_call_ran
87
88 def submit(self, fn: Callable[_P, _T], /, *args: _P.args, **kwargs: _P.kwargs) -> Future[_T]:
89 future = super().submit(fn, *args, **kwargs)
90 if not self.fail_next_submit:
91 return future
92 self.fail_next_submit = False
93 if self._after_call_ran:
94 future.result(timeout=5)
95 msg = "can't start new thread"
96 raise RuntimeError(msg)
97
98
99__all__ = [

Calls

no outgoing calls