cpython/Lib/test/test_concurrent_futures
Charles Machalow f97e4098ff
gh-128041: Add terminate_workers and kill_workers methods to ProcessPoolExecutor (GH-128043)
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>
Commit-message-mostly-authored-by: Claude Sonnet 3.7 (because why not -greg)
2025-03-02 18:01:45 -08:00
..
__init__.py gh-71052: fix test_concurrent_futures wasi regression. (#115923) 2024-02-26 00:02:56 +00:00
executor.py gh-124694: Add concurrent.futures.InterpreterPoolExecutor (gh-124548) 2024-10-16 16:50:46 -06:00
test_as_completed.py gh-109565: Fix concurrent.futures test_future_times_out() (#109949) 2023-09-27 08:51:44 +00:00
test_deadlock.py Fix typos (#123775) 2024-09-09 14:58:26 +02:00
test_future.py
test_init.py gh-117657: Skip test when running under TSan (GH-121549) 2024-07-09 14:12:45 -07:00
test_interpreter_pool.py gh-127949: deprecate asyncio.set_event_loop_policy (#128024) 2024-12-18 11:35:29 +05:30
test_process_pool.py gh-128041: Add terminate_workers and kill_workers methods to ProcessPoolExecutor (GH-128043) 2025-03-02 18:01:45 -08:00
test_shutdown.py gh-125451: Fix deadlock in ProcessPoolExecutor shutdown (#125492) 2024-10-16 11:39:17 -04:00
test_thread_pool.py gh-88110: Clear concurrent.futures.thread._threads_queues after fork to avoid joining parent process' threads (GH-126098) 2024-11-22 18:20:34 +02:00
test_wait.py Revert "gh-128364: Fix flaky test_timeout test (gh-130724)" (gh-130732) 2025-03-01 17:22:13 +00:00
util.py Revert "gh-128364: Fix flaky test_timeout test (gh-130724)" (gh-130732) 2025-03-01 17:22:13 +00:00