| 840 | return _chain_from_iterable_of_lists(results) |
| 841 | |
| 842 | def shutdown(self, wait=True, *, cancel_futures=False): |
| 843 | with self._shutdown_lock: |
| 844 | self._cancel_pending_futures = cancel_futures |
| 845 | self._shutdown_thread = True |
| 846 | if self._executor_manager_thread_wakeup is not None: |
| 847 | # Wake up queue management thread |
| 848 | self._executor_manager_thread_wakeup.wakeup() |
| 849 | |
| 850 | if self._executor_manager_thread is not None and wait: |
| 851 | self._executor_manager_thread.join() |
| 852 | # To reduce the risk of opening too many files, remove references to |
| 853 | # objects that use file descriptors. |
| 854 | self._executor_manager_thread = None |
| 855 | self._call_queue = None |
| 856 | if self._result_queue is not None and wait: |
| 857 | self._result_queue.close() |
| 858 | self._result_queue = None |
| 859 | self._processes = None |
| 860 | self._executor_manager_thread_wakeup = None |
| 861 | |
| 862 | shutdown.__doc__ = _base.Executor.shutdown.__doc__ |