[issue40513] Move _PyRuntimeState.ceval to PyInterpreterState

Eric Snow report at bugs.python.org
Tue May 5 11:11:26 EDT 2020


Eric Snow <ericsnowcurrently at gmail.com> added the comment:

FWIW, I think it would make sense to keep "signals_pending" under _PyRuntimeState rather than moving it to PyInterpreterState.

Signals are only handled by the main interpreter (in its main thread).  Even though "signals_pending" is useful to only one interpreter in the runtime, making it per-interpreter sends the wrong message that it is significant at that level.  This may be confusing to readers of the code.

At the very least there should be a clear comment with the field in Include/internal/pycore_interp.h explaining how it is only used by the main interpreter and why we made it per-interpreter anyway.

----------
nosy: +eric.snow

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue40513>
_______________________________________


More information about the Python-bugs-list mailing list