MCPcopy Index your code
hub / github.com/RustPython/RustPython / run_in_executor

Method run_in_executor

Lib/asyncio/base_events.py:884–898  ·  view source on GitHub ↗
(self, executor, func, *args)

Source from the content-addressed store, hash-verified

882 return handle
883
884 def run_in_executor(self, executor, func, *args):
885 self._check_closed()
886 if self._debug:
887 self._check_callback(func, 'run_in_executor')
888 if executor is None:
889 executor = self._default_executor
890 # Only check when the default executor is being used
891 self._check_default_executor()
892 if executor is None:
893 executor = concurrent.futures.ThreadPoolExecutor(
894 thread_name_prefix='asyncio'
895 )
896 self._default_executor = executor
897 return futures.wrap_future(
898 executor.submit(func, *args), loop=self)
899
900 def set_default_executor(self, executor):
901 if not isinstance(executor, concurrent.futures.ThreadPoolExecutor):

Callers 4

getaddrinfoMethod · 0.95
getnameinfoMethod · 0.95
_sendfile_fallbackMethod · 0.95

Calls 4

_check_closedMethod · 0.95
_check_callbackMethod · 0.95
submitMethod · 0.95

Tested by

no test coverage detected