diff options
author | Victor Stinner <vstinner@python.org> | 2020-03-25 20:23:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-25 20:23:53 (GMT) |
commit | 5c3cda0d1a850a1a9b43892f48376b8876bd5863 (patch) | |
tree | 723a2cb38dfec21de9cabe70d2bc952986788f5f /Doc/c-api/init.rst | |
parent | 0e427c6d159e86f17270770cd8dc37372e3c4004 (diff) | |
download | cpython-5c3cda0d1a850a1a9b43892f48376b8876bd5863.zip cpython-5c3cda0d1a850a1a9b43892f48376b8876bd5863.tar.gz cpython-5c3cda0d1a850a1a9b43892f48376b8876bd5863.tar.bz2 |
bpo-39947: Add PyThreadState_GetID() function (GH-19163)
Add PyThreadState_GetID() function: get the unique identifier of a
Python thread state.
Diffstat (limited to 'Doc/c-api/init.rst')
-rw-r--r-- | Doc/c-api/init.rst | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index 294c1b9..f78ab99 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -1084,6 +1084,15 @@ All of the following functions must be called after :c:func:`Py_Initialize`. .. versionadded:: 3.9 +.. c:function:: uint64_t PyThreadState_GetID(PyThreadState *tstate) + + Get the unique thread state identifier of the Python thread state *tstate*. + + *tstate* must not be ``NULL``. + + .. versionadded:: 3.9 + + .. c:function:: PyInterpreterState* PyThreadState_GetInterpreter(PyThreadState *tstate) Get the interpreter of the Python thread state *tstate*. |