]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-131185: Use a proper thread-local for cached thread states (gh-132510)
authorPeter Bierma <zintensitydev@gmail.com>
Wed, 21 May 2025 13:01:25 +0000 (09:01 -0400)
committerGitHub <noreply@github.com>
Wed, 21 May 2025 13:01:25 +0000 (07:01 -0600)
commitb8998fe2d8249565bf30ce6075ed678e1643f2a4
treeff900111f7852bdec78465e76cca8fc714eaaf0b
parentdcfc91e4e552e74a43f5fdf049af7a8fe7a784ee
gh-131185: Use a proper thread-local for cached thread states (gh-132510)

Switches over to a _Py_thread_local in place of autoTssKey, and also fixes a few other checks regarding PyGILState_Ensure after finalization.

Note that this doesn't fix concurrent use of PyGILState_Ensure with Py_Finalize; I'm pretty sure zapthreads doesn't work at all, and that needs to be fixed seperately.
Include/internal/pycore_runtime_init.h
Include/internal/pycore_runtime_structs.h
Lib/test/test_embed.py
Misc/NEWS.d/next/C_API/2025-04-14-07-41-28.gh-issue-131185.ZCjMHD.rst [new file with mode: 0644]
Programs/_testembed.c
Python/pystate.c
Tools/c-analyzer/cpython/ignored.tsv