[issue1021318] PyThreadState_Next not thread safe

Julien Danjou report at bugs.python.org
Tue Dec 10 08:42:39 EST 2019


Julien Danjou <julien at danjou.info> added the comment:

It'd be great if you could reopen it. I'm interested in fixing it properly.

It's impossible to "solve" in Python 2 since the head mutex is not accessible (it's static in pystate.c) but this is doable with Python 3 (yay).

We'd simply need to provide a new API to lock/unlock the interpreter's mutex.

How hard to you need the script to reproduce? I can try to spend some time to extract some of my code to have one if that's really needed (I'm using Cython to generate some of the C code).

----------

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


More information about the Python-bugs-list mailing list