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 <1346214079.25.0.544073228468.issue15751@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2012-08-29 04:21:19ncoghlansetrecipients: + ncoghlan, mhammond, pitrou, grahamd, asvetlov
2012-08-29 04:21:19ncoghlansetmessageid: <1346214079.25.0.544073228468.issue15751@psf.upfronthosting.co.za>
2012-08-29 04:21:18ncoghlanlinkissue15751 messages
2012-08-29 04:21:18ncoghlancreate