MCPcopy Index your code
hub / github.com/python/cpython / shutdown

Method shutdown

Lib/concurrent/futures/process.py:870–888  ·  view source on GitHub ↗
(self, wait=True, *, cancel_futures=False)

Source from the content-addressed store, hash-verified

868 return _chain_from_iterable_of_lists(results)
869
870 def shutdown(self, wait=True, *, cancel_futures=False):
871 with self._shutdown_lock:
872 self._cancel_pending_futures = cancel_futures
873 self._shutdown_thread = True
874 if self._executor_manager_thread_wakeup is not None:
875 # Wake up queue management thread
876 self._executor_manager_thread_wakeup.wakeup()
877
878 if self._executor_manager_thread is not None and wait:
879 self._executor_manager_thread.join()
880 # To reduce the risk of opening too many files, remove references to
881 # objects that use file descriptors.
882 self._executor_manager_thread = None
883 self._call_queue = None
884 if self._result_queue is not None and wait:
885 self._result_queue.close()
886 self._result_queue = None
887 self._processes = None
888 self._executor_manager_thread_wakeup = None
889
890 shutdown.__doc__ = _base.Executor.shutdown.__doc__
891

Callers 4

mainMethod · 0.95
test_shutdown_no_waitMethod · 0.95
_force_shutdownMethod · 0.95

Calls 3

wakeupMethod · 0.45
joinMethod · 0.45
closeMethod · 0.45

Tested by 3

mainMethod · 0.76
test_shutdown_no_waitMethod · 0.76