This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ncoghlan
Recipients asvetlov, grahamd, mhammond, ncoghlan, pitrou
Date 2012-08-29.04:21:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Currently, both PyGILState_Ensure and PyGILState_Release just call PyFatal_Error if anything goes wrong. With the *Ex versions, it would be possible to replace those fatal errors with more conventional error handling.

For Ensure, the likely error is failing to create the thread state.

For Release, the likely error is calling it with the system in the wrong state.

I think the current API reflects a difference between an extension mindset and an embedding mindset. If those calls go wrong in an extension context, killing the entire application is likely the only thing you can reasonably do. In an embedded context, though, the embedding application likely has other options (such as reinitialising the entire Python interpreter).
Date User Action Args
2012-08-29 04:21:19ncoghlansetrecipients: + ncoghlan, mhammond, pitrou, grahamd, asvetlov
2012-08-29 04:21:19ncoghlansetmessageid: <>
2012-08-29 04:21:18ncoghlanlinkissue15751 messages
2012-08-29 04:21:18ncoghlancreate