]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-109746: Make _thread.start_new_thread delete state of new thread on its...
authorSerhiy Storchaka <storchaka@gmail.com>
Fri, 22 Nov 2024 19:56:39 +0000 (21:56 +0200)
committerGitHub <noreply@github.com>
Fri, 22 Nov 2024 19:56:39 +0000 (19:56 +0000)
commitf1e74248025b36a0c5d12f72c4ab713f4682f523
tree1cca552af7b9a39280ab6eb6cc73bacf32841290
parent29648980d440e70ade4e0975b8d6aa83214866ed
[3.12] gh-109746: Make _thread.start_new_thread delete state of new thread on its startup failure (GH-109761) (GH-127173)

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