classification
Title: Interrupt/kill threads w/exception
Type: enhancement Stage: test needed
Components: Interpreter Core Versions: Python 3.2
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: josiahcarlson, oliverbock
Priority: normal Keywords:

Created on 2006-06-20 04:30 by oliverbock, last changed 2010-08-09 03:40 by terry.reedy.

Messages (2)
msg61241 - (view) Author: Oliver Bock (oliverbock) Date: 2006-06-20 04:30
When unsophisticated (but not evil) users write Python
macros, they occasionally write infinite loops.  It
would be nice if it was possible to interrupt threads
to break these loops.  The safety of rasing an
exception in another thread was noted in

http://sourceforge.net/tracker/?func=detail&atid=305470&aid=452266&group_id=5470

Anton Wilson wrote a patch for this some time ago:

http://mail.python.org/pipermail/python-list/2003-February/148999.html

Note that this won't help if the thread is blocked on I/O.
msg61242 - (view) Author: Josiah Carlson (josiahcarlson) Date: 2006-06-23 18:24
Logged In: YES 
user_id=341410

It would be nice to be able to kill runaway threads, though
I have no comment on the patch that Anton Wilson offers
(which will no doubt need to be updated for more recent
Pythons).
History
Date User Action Args
2010-08-09 03:40:42terry.reedysetversions: + Python 3.2, - Python 3.1, Python 2.7
2009-03-30 06:33:03ajaksu2setstage: test needed
versions: + Python 3.1, Python 2.7
2006-06-20 04:30:39oliverbockcreate