(self, executor, func, *args)
| 887 | return handle |
| 888 | |
| 889 | def run_in_executor(self, executor, func, *args): |
| 890 | self._check_closed() |
| 891 | if self._debug: |
| 892 | self._check_callback(func, 'run_in_executor') |
| 893 | if executor is None: |
| 894 | executor = self._default_executor |
| 895 | # Only check when the default executor is being used |
| 896 | self._check_default_executor() |
| 897 | if executor is None: |
| 898 | executor = concurrent.futures.ThreadPoolExecutor( |
| 899 | thread_name_prefix='asyncio' |
| 900 | ) |
| 901 | self._default_executor = executor |
| 902 | return futures.wrap_future( |
| 903 | executor.submit(func, *args), loop=self) |
| 904 | |
| 905 | def set_default_executor(self, executor): |
| 906 | if not isinstance(executor, concurrent.futures.ThreadPoolExecutor): |
no test coverage detected