mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
#10741: add documentation for PyGILState_GetThisThreadState()
This commit is contained in:
parent
2a389e4601
commit
61baee0ee7
2 changed files with 9 additions and 1 deletions
|
@ -646,6 +646,14 @@ with sub-interpreters:
|
||||||
:c:func:`PyGILState_Release` on the same thread.
|
: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
|
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.
|
||||||
|
|
||||||
|
|
|
@ -195,7 +195,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.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue