]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-88110: Clear concurrent.futures.thread._threads_queues after fork to avoid...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 22 Nov 2024 17:08:18 +0000 (18:08 +0100)
committerGitHub <noreply@github.com>
Fri, 22 Nov 2024 17:08:18 +0000 (17:08 +0000)
commit329865b883c4c51026c6abe656f2c0e83fed2c4e
treeabc0ced17f401b139ccd4e67bc5fffa46d38563d
parentf0d1a20b77b136906505e1f8a52597498f7b3257
[3.13] gh-88110: Clear concurrent.futures.thread._threads_queues after fork to avoid joining parent process' threads (GH-126098) (GH-127163)

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]