bpo-40010: COMPUTE_EVAL_BREAKER() checks for subinterpreter by vstinner · Pull Request #19087 · python/cpython
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters