forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythongh-109047: concurrent.futures _ExecutorManagerThread catches Py…
…thonFinalizationError _ExecutorManagerThread of concurrent.futures now catches PythonFinalizationError: call terminate_broken(). The exception occurs when adding an item to the "call_queue" creates a new thread while Python is being finalized. Add test_python_finalization_error() to test_concurrent_futures. Changes: * _ExecutorManagerThread.terminate_broken() no longer calls shutdown_workers() since the queue is no longer working anymore (read and write ends of the queue pipe are closed). * multiprocessing.Queue: * Add _terminate_broken() method. * _start_thread() starts _thread to None on exception to prevent leaking "dangling threads" even if the thread was not started yet. * wait_result_broken_or_wakeup() now uses the short form of traceback.format_exception().
- Loading branch information
Showing
3 changed files
with
59 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters