diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/c-api/init.rst | 9 | ||||
-rw-r--r-- | Doc/whatsnew/3.9.rst | 2 |
2 files changed, 11 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*. diff --git a/Doc/whatsnew/3.9.rst b/Doc/whatsnew/3.9.rst index b11c29b..778e443 100644 --- a/Doc/whatsnew/3.9.rst +++ b/Doc/whatsnew/3.9.rst @@ -429,6 +429,8 @@ Build and C API Changes :c:func:`PyInterpreterState_Get` functions to get the interpreter. New :c:func:`PyThreadState_GetFrame` function to get the current frame of a Python thread state. + New :c:func:`PyThreadState_GetID` function: get the unique identifier of a + Python thread state. (Contributed by Victor Stinner in :issue:`39947`.) * Add ``--with-platlibdir`` option to the ``configure`` script: name of the |