mirror of
https://github.com/python/cpython.git
synced 2025-08-02 08:02:56 +00:00
Document PyThreadState_SetAsyncExc().
This commit is contained in:
parent
63fd15c3d3
commit
6595e15331
1 changed files with 14 additions and 0 deletions
|
@ -685,6 +685,20 @@ interpreter lock has been created.
|
||||||
thread is active, and \NULL meant that an exception was raised]{2.3}
|
thread is active, and \NULL meant that an exception was raised]{2.3}
|
||||||
\end{cfuncdesc}
|
\end{cfuncdesc}
|
||||||
|
|
||||||
|
\begin{cfuncdesc}{int}{PyThreadState_SetAsyncExc}{long id, PyObject *exc}
|
||||||
|
Asynchronously raise an exception in a thread.
|
||||||
|
The \var{id} argument is the thread id of the target thread;
|
||||||
|
\var{exc} is the exception object to be raised.
|
||||||
|
This function does not steal any references to \var{exc}.
|
||||||
|
To prevent naive misuse, you must write your own C extension
|
||||||
|
to call this. Must be called with the GIL held.
|
||||||
|
Returns the number of thread states modified; if it returns a number
|
||||||
|
greater than one, you're in trouble, and you should call it again
|
||||||
|
with \var{exc} set to \constant{NULL} to revert the effect.
|
||||||
|
This raises no exceptions.
|
||||||
|
\versionadded{2.3}
|
||||||
|
\end{cfuncdesc}
|
||||||
|
|
||||||
|
|
||||||
\section{Profiling and Tracing \label{profiling}}
|
\section{Profiling and Tracing \label{profiling}}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue