diff Doc/api/init.tex @ 29649:8bd2580e0155 legacy-trunk

Document PyThreadState_SetAsyncExc().
author Fred Drake <fdrake@acm.org>
date Sun, 29 Jun 2003 02:14:31 +0000
parents 4f0b7acffc7d
children b86446f0350f
line wrap: on
line diff
--- a/Doc/api/init.tex	Sun Jun 29 00:57:17 2003 +0000
+++ b/Doc/api/init.tex	Sun Jun 29 02:14:31 2003 +0000
@@ -685,6 +685,20 @@
   thread is active, and \NULL meant that an exception was raised]{2.3}
 \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}}