]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.12] gh-105716: Support Background Threads in Subinterpreters Consistently (gh...
authorEric Snow <ericsnowcurrently@gmail.com>
Tue, 28 Nov 2023 02:01:05 +0000 (19:01 -0700)
committerGitHub <noreply@github.com>
Tue, 28 Nov 2023 02:01:05 +0000 (19:01 -0700)
commit0122b4d7c92855e97912cf827dd81d836725c9a4
tree4a1e3355d8bf5e9d2b9f36745518f56f590df021
parent82ae5a609d9a2c0ff2384527a18ff1caf7410052
[3.12] gh-105716: Support Background Threads in Subinterpreters Consistently (gh-109921) (gh-110707)

The existence of background threads running on a subinterpreter was preventing interpreters from getting properly destroyed, as well as impacting the ability to run the interpreter again. It also affected how we wait for non-daemon threads to finish.

We add PyInterpreterState.threads.main, with some internal C-API functions.

(cherry-picked from commit 1dd9dee45d2591b4e701039d1673282380696849)
Doc/data/python3.12.abi
Include/internal/pycore_interp.h
Include/internal/pycore_pystate.h
Lib/test/test_interpreters.py
Lib/test/test_threading.py
Lib/threading.py
Misc/NEWS.d/next/Core and Builtins/2023-09-26-14-00-25.gh-issue-105716.SUJkW1.rst [new file with mode: 0644]
Modules/_threadmodule.c
Modules/_xxsubinterpretersmodule.c
Modules/main.c
Python/pystate.c