]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-40010: COMPUTE_EVAL_BREAKER() checks for subinterpreter (GH-19087)
authorVictor Stinner <vstinner@python.org>
Fri, 20 Mar 2020 12:38:58 +0000 (13:38 +0100)
committerGitHub <noreply@github.com>
Fri, 20 Mar 2020 12:38:58 +0000 (13:38 +0100)
commitd2a8e5b42c5e9c4e745a0589043a8aebb49f8ca2
treebf76400eb6529986ba4319faf4664a70a7303869
parentda2914db4b6f786a1e9f0b424efeeb6ca9418912
bpo-40010: COMPUTE_EVAL_BREAKER() checks for subinterpreter (GH-19087)

COMPUTE_EVAL_BREAKER() now also checks if the Python thread state
belongs to the main interpreter. Don't break the evaluation loop if
there are pending signals but the Python thread state it belongs to a
subinterpeter.

* Add _Py_IsMainThread() function.
* Add _Py_ThreadCanHandleSignals() function.
Doc/library/signal.rst
Include/internal/pycore_pystate.h
Modules/signalmodule.c
Python/ceval.c
Python/pystate.c