Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pythongh-88110: clear concurrent.futures.thread._threads_queues after…
… fork Threads are gone after fork, so clear the queues too. Otherwise the child process (here created via multiprocessing.Process) crashes on interpreter exit with: Traceback (most recent call last): File "/usr/lib64/python3.11/multiprocessing/popen_fork.py", line 72, in _launch code = process_obj._bootstrap(parent_sentinel=child_r) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/usr/lib64/python3.11/multiprocessing/process.py", line 332, in _bootstrap threading._shutdown() File "/usr/lib64/python3.11/threading.py", line 1561, in _shutdown atexit_call() File "/usr/lib64/python3.11/concurrent/futures/thread.py", line 31, in _python_exit t.join() File "/usr/lib64/python3.11/threading.py", line 1109, in join raise RuntimeError("cannot join current thread") RuntimeError: cannot join current thread Fixes python#88110
- Loading branch information