diff options
author | Fred Drake <fdrake@acm.org> | 2003-06-29 02:14:31 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2003-06-29 02:14:31 (GMT) |
commit | 6595e153311d5930ea4b1ce78f978eaf6c0601fc (patch) | |
tree | 0b1eca99fd9348cbc8c3fca2a55e7c8fdfc2951f /Doc/api | |
parent | 63fd15c3d35393b96ab93403926a5284b81030e2 (diff) | |
download | cpython-6595e153311d5930ea4b1ce78f978eaf6c0601fc.zip cpython-6595e153311d5930ea4b1ce78f978eaf6c0601fc.tar.gz cpython-6595e153311d5930ea4b1ce78f978eaf6c0601fc.tar.bz2 |
Document PyThreadState_SetAsyncExc().
Diffstat (limited to 'Doc/api')
-rw-r--r-- | Doc/api/init.tex | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Doc/api/init.tex b/Doc/api/init.tex index 388f479..44bfa3e 100644 --- a/Doc/api/init.tex +++ b/Doc/api/init.tex @@ -685,6 +685,20 @@ interpreter lock has been created. 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}} |