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)
| 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. |