Lines Matching refs:executor
565 """Schedule the shutdown of the default executor."""
666 This clears the queues and shuts down the executor,
667 but does not wait for the executor to finish.
681 executor = self._default_executor
682 if executor is not None:
684 executor.shutdown(wait=False)
815 def run_in_executor(self, executor, func, *args):
819 if executor is None:
820 executor = self._default_executor
821 # Only check when the default executor is being used
823 if executor is None:
824 executor = concurrent.futures.ThreadPoolExecutor(
827 self._default_executor = executor
829 executor.submit(func, *args), loop=self)
831 def set_default_executor(self, executor):
832 if not isinstance(executor, concurrent.futures.ThreadPoolExecutor):
833 raise TypeError('executor must be ThreadPoolExecutor instance')
834 self._default_executor = executor