Issue #17522: Add the PyGILState_Check() API.

This commit is contained in:
Kristján Valur Jónsson 2013-03-23 03:36:16 -07:00
parent d4296fc19c
commit 684cd0e643
4 changed files with 28 additions and 0 deletions

View file

@ -212,6 +212,11 @@ PyAPI_FUNC(void) PyGILState_Release(PyGILState_STATE);
*/
PyAPI_FUNC(PyThreadState *) PyGILState_GetThisThreadState(void);
/* Helper/diagnostic function - return 1 if the current thread
* currently holds the GIL, 0 otherwise
*/
PyAPI_FUNC(int) PyGILState_Check(void);
#endif /* #ifdef WITH_THREAD */
/* The implementation of sys._current_frames() Returns a dict mapping