Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > PyThreadState_SetAsyncExc and native extensions

Thread Tools

PyThreadState_SetAsyncExc and native extensions
Posts: n/a
Does anyone know if PyThreadState_SetAsyncExc stops a thread while its
inside a native extension ?
I'm trying to stop a testing script that boils down to this:

while True:
print "aaa"
print "bbb"

Using PyThreadState_SetAsyncExc the module doesn't stop but if I add
more print statements to increase the chance that
PyThreadState_SetAsyncExc is called when the module is executing Python
code, the module stops.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
PyThreadState_SetAsyncExc (nThreadId ??????, exc); iwl Python 1 12-14-2006 04:15 PM
PyThreadState_SetAsyncExc, PyErr_Clear and boost::python Python 0 05-10-2006 06:23 PM
Using PyThreadState_SetAsyncExc with PyEval_CallObject Python 0 08-11-2005 04:17 PM
raising an exception in one thread from an other. (PyThreadState_SetAsyncExc) Antoon Pardon Python 0 03-15-2005 09:58 AM
PyThreadState_SetAsyncExc ignores except: clause Bob Alistar Python 0 12-04-2003 10:34 AM