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

Method terminate_workers

Lib/concurrent/futures/process.py:933–942  ·  view source on GitHub ↗

Attempts to terminate the executor's workers. Iterates through all of the current worker processes and terminates each one that is still alive. After terminating workers, the pool will be in a broken state and no longer usable (for instance, new tasks should not be

(self)

Source from the content-addressed store, hash-verified

931 continue
932
933 def terminate_workers(self):
934 """Attempts to terminate the executor's workers.
935 Iterates through all of the current worker processes and terminates
936 each one that is still alive.
937
938 After terminating workers, the pool will be in a broken state
939 and no longer usable (for instance, new tasks should not be
940 submitted).
941 """
942 return self._force_shutdown(operation=_TERMINATE)
943
944 def kill_workers(self):
945 """Attempts to kill the executor's workers.

Callers 1

Calls 1

_force_shutdownMethod · 0.95

Tested by 1