[issue43311] bpo-43311: PyInterpreterState_New use thread-specific data tstate before key create .

STINNER Victor report at bugs.python.org
Tue Mar 9 16:13:45 EST 2021


STINNER Victor <vstinner at python.org> added the comment:

> PyInterpreterState_New call and use PyThreadState *tstate = _PyThreadState_GET();

It is safe to call _PyThreadState_GET() before _PyGILState_Init().

_PyThreadState_GET() calls _Py_atomic_load_relaxed(&_PyRuntime.gilstate.tstate_current), it doesn't use autoTSSkey. Or did I miss something?

Are you building Python with --with-experimental-isolated-subinterpreters?

----------

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


More information about the Python-bugs-list mailing list