]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-88110: Clear concurrent.futures.thread._threads_queues after fork to avoid...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 30 Nov 2024 09:05:46 +0000 (10:05 +0100)
committerGitHub <noreply@github.com>
Sat, 30 Nov 2024 09:05:46 +0000 (09:05 +0000)
commit7c7ed49b518f986806edf2f3d67198cb516b7a98
tree89103e92965768b26466fc2db0f1b0d29a78b141
parente7ab97862deb8ad69caccbc5c6e1f7b4e670afbd
[3.12] gh-88110: Clear concurrent.futures.thread._threads_queues after fork to avoid joining parent process' threads (GH-126098) (GH-127164)

Threads are gone after fork, so clear the queues too. Otherwise the
child process (here created via multiprocessing.Process) crashes on
interpreter exit.

(cherry picked from commit 1848ce61f349533ae5892a8c24c2e0e3c364fc8a)

Co-authored-by: Andrei Bodrov <Drino@users.noreply.github.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Lib/concurrent/futures/thread.py
Lib/test/test_concurrent_futures/test_thread_pool.py
Misc/NEWS.d/next/Library/2023-02-15-23-54-42.gh-issue-88110.KU6erv.rst [new file with mode: 0644]