diff options
author | Charles Machalow <csm10495@gmail.com> | 2025-03-05 14:31:42 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-05 14:31:42 -0800 |
commit | ba05a4ebcb67506b4e6d65ea11e78d06f57dc23b (patch) | |
tree | 830551a364a1c213a9ee63ffdd05d6b0d55b573e /Python/ast_unparse.c | |
parent | 02de9cb9a8fa5b0ae3947231b8c0677834aaee45 (diff) | |
download | cpython-ba05a4ebcb67506b4e6d65ea11e78d06f57dc23b.tar.gz cpython-ba05a4ebcb67506b4e6d65ea11e78d06f57dc23b.zip |
gh-128041: Add `terminate_workers` and `kill_workers` methods to ProcessPoolExecutor (GH-130849)
This adds two new methods to `multiprocessing`'s `ProcessPoolExecutor`:
- **`terminate_workers()`**: forcefully terminates worker processes using `Process.terminate()`
- **`kill_workers()`**: forcefully kills worker processes using `Process.kill()`
These methods provide users with a direct way to stop worker processes without `shutdown()` or relying on implementation details, addressing situations where immediate termination is needed.
Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
Co-authored-by: Sam Gross @colesbury
Commit-message-mostly-authored-by: Claude Sonnet 3.7 (because why not -greg)
Diffstat (limited to 'Python/ast_unparse.c')
0 files changed, 0 insertions, 0 deletions