summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/init.rst
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-03-25 20:23:53 (GMT)
committerGitHub <noreply@github.com>2020-03-25 20:23:53 (GMT)
commit5c3cda0d1a850a1a9b43892f48376b8876bd5863 (patch)
tree723a2cb38dfec21de9cabe70d2bc952986788f5f /Doc/c-api/init.rst
parent0e427c6d159e86f17270770cd8dc37372e3c4004 (diff)
downloadcpython-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.rst9
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*.