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
executor.py gh-124694: Add concurrent.futures.InterpreterPoolExecutor (gh-124548) 2024-10-16 16:50:46 -06:00
test_as_completed.py
test_deadlock.py Fix typos (#123775) 2024-09-09 14:58:26 +02:00
test_future.py
test_init.py
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