Message169334
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:19 | ncoghlan | set | recipients:
+ ncoghlan, mhammond, pitrou, grahamd, asvetlov |
2012-08-29 04:21:19 | ncoghlan | set | messageid: <1346214079.25.0.544073228468.issue15751@psf.upfronthosting.co.za> |
2012-08-29 04:21:18 | ncoghlan | link | issue15751 messages |
2012-08-29 04:21:18 | ncoghlan | create | |
|