Commits

sandrotosi committed 53b8260

#10741: add documentation for PyGILState_GetThisThreadState()

Comments (0)

Files changed (2)

Doc/c-api/init.rst

    :c:func:`PyGILState_Release` on the same thread.
 
 
+.. 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.
+
+
 The following macros are normally used without a trailing semicolon; look for
 example usage in the Python source distribution.
 

Include/pystate.h

 
 /* Helper/diagnostic function - get the current thread state for
    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
    on the main thread.
 */