May 25, 2014
11:19 p.m.
New issue 1778: PyGILState_Ensure should not deadlock if GIL already held https://bitbucket.org/pypy/pypy/issue/1778/pygilstate_ensure-should-not-dead... Nick Williams: PyGILState_Ensure is documented as "(ensuring) that the current thread is ready to call the Python C API regardless of the current state of Python, or of the global interpreter lock". However, in PyPy, code which calls PyGILState_Ensure while already holding the GIL will deadlock. This does not happen in CPython and does not seem consistent with the Python documentation.