Commit 9943c0d5 authored by Sandro Tosi's avatar Sandro Tosi

#10741: add documentation for PyGILState_GetThisThreadState()

parent 1381a31e
...@@ -638,6 +638,16 @@ with sub-interpreters: ...@@ -638,6 +638,16 @@ with sub-interpreters:
.. versionadded:: 2.3 .. versionadded:: 2.3
.. c:function:: PyThreadState PyGILState_GetThisThreadState()
Get the current thread state for this thread. May return ``NULL`` if no
GILState API has been used on the current thread. Note that the main thread
always has such a thread-state, even if no auto-thread-state call has been
made on the main thread. This is mainly a helper/diagnostic function.
.. versionadded:: 2.3
The following macros are normally used without a trailing semicolon; look for The following macros are normally used without a trailing semicolon; look for
example usage in the Python source distribution. example usage in the Python source distribution.
......
...@@ -169,7 +169,7 @@ PyAPI_FUNC(void) PyGILState_Release(PyGILState_STATE); ...@@ -169,7 +169,7 @@ PyAPI_FUNC(void) PyGILState_Release(PyGILState_STATE);
/* Helper/diagnostic function - get the current thread state for /* Helper/diagnostic function - get the current thread state for
this thread. May return NULL if no GILState API has been used this thread. May return NULL if no GILState API has been used
on the current thread. Note the main thread always has such a on the current thread. Note that the main thread always has such a
thread-state, even if no auto-thread-state call has been made thread-state, even if no auto-thread-state call has been made
on the main thread. on the main thread.
*/ */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment