diff options
Diffstat (limited to 'Doc/c-api/init.rst')
-rw-r--r-- | Doc/c-api/init.rst | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Doc/c-api/init.rst b/Doc/c-api/init.rst index afb1771..273838c 100644 --- a/Doc/c-api/init.rst +++ b/Doc/c-api/init.rst @@ -1239,12 +1239,25 @@ All of the following functions must be called after :c:func:`Py_Initialize`. The global interpreter lock need not be held, but may be held if it is necessary to serialize calls to this function. + .. audit-event:: cpython.PyThreadState_New id c.PyThreadState_New + + Raise an auditing event ``cpython.PyThreadState_New`` with Python's thread + id as the argument. The event will be raised from the thread creating the new + ``PyThreadState``, which may not be the new thread. + .. c:function:: void PyThreadState_Clear(PyThreadState *tstate) Reset all information in a thread state object. The global interpreter lock must be held. + .. audit-event:: cpython.PyThreadState_Clear id c.PyThreadState_Clear + + Raise an auditing event ``cpython.PyThreadState_Clear`` with Python's + thread id as the argument. The event may be raised from a different thread + than the one being cleared. Exceptions raised from a hook will be treated + as unraisable and will not abort the operation. + .. versionchanged:: 3.9 This function now calls the :c:member:`PyThreadState.on_delete` callback. Previously, that happened in :c:func:`PyThreadState_Delete`. |