bpo-39947: Add PyThreadState_GetID() function (GH-19163)

Add PyThreadState_GetID() function: get the unique identifier of a
Python thread state.
This commit is contained in:
Victor Stinner 2020-03-25 21:23:53 +01:00 committed by GitHub
parent 0e427c6d15
commit 5c3cda0d1a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 25 additions and 2 deletions

View file

@ -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*.