]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.13] gh-109746: Make _thread.start_new_thread delete state of new thread on its...
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 22 Nov 2024 19:55:44 +0000 (21:55 +0200)
committerGitHub <noreply@github.com>
Fri, 22 Nov 2024 19:55:44 +0000 (19:55 +0000)
commit75ef92da291247fd9d21ec26bd22bf8055b5f330
treeac712250b2a8d3a08a6a770ad1265aa649cd685c
parent950daf8765d5ea026112c2affccc9ae06ee90827
[3.13] gh-109746: Make _thread.start_new_thread delete state of new thread on its startup failure (GH-109761) (GH-127171)

If Python fails to start newly created thread
due to failure of underlying PyThread_start_new_thread() call,
its state should be removed from interpreter' thread states list
to avoid its double cleanup.

(cherry picked from commit ca3ea9ad05c3d876a58463595e5b4228fda06936)

Co-authored-by: Radislav Chugunov <52372310+chgnrdv@users.noreply.github.com>
Lib/test/test_threading.py
Misc/NEWS.d/next/Core_and_Builtins/2023-09-22-21-01-56.gh-issue-109746.32MHt9.rst [new file with mode: 0644]
Modules/_threadmodule.c
Python/pystate.c