Scott David Daniels <scott.dani...@acm.org> writes: > But precisely because of that sharing the thread may be in the middle > something that "must complete" -- no with-statement locking will get > unlocked, no "finally:" clauses in code in the standard library, no > ... -- there is just too much that goes wrong when a thread is > infinitely starved (which, in effect, is what would happen if you > could kill it).
Right, it's better to recognize this sort of problem than to brush it off. There was a discussion in sourceforge a long time ago about adding a way to raise exceptions in threads, and I think there is some way to do it through the C API. -- http://mail.python.org/mailman/listinfo/python-list