Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Feature or enhancement
Proposal:
This is an interpretation of the feature ask in:https://discuss.python.org/t/cancel-running-work-in-processpoolexecutor/58605/1. It would be a way to stop all the workers running in aProcessPoolExecutor
p=ProcessPoolExecutor()# use p# i know i want p to die at this point no matter whatp.terminate_workers()
Previously the way to do this was to use to loop through the._processes of theProcessPoolExecutor though, preferably this should be possible without accessing implementation details.
Has this already been discussed elsewhere?
I have already discussed this feature proposal on Discourse
Links to previous discussion of this feature:
https://discuss.python.org/t/cancel-running-work-in-processpoolexecutor/58605/1
Linked PRs
- gh-128041: Add a terminate_workers method to ProcessPoolExecutor #128043
- gh-128041: Try to fix transiency of test_force_shutdown_workers #130812
- Revert "gh-128041: Add
terminate_workersandkill_workersmethods to ProcessPoolExecutor (GH-128043)" #130838 - gh-128041: Add
terminate_workersandkill_workersmethods to ProcessPoolExecutor #130849 - gh-128041: Fix incorrect bullet placement #130900