Antoine Pitrou <[email protected]> added the comment:

Agreed with Brian. There is generally no reliable way to terminate another 
thread or process without cooperation from said thread or process. Especially 
in the case of threads, terminating a thread while leaving the process alive 
may leave some resources (including Python interpreter resources) in a 
consistent state. Admittedly, terminating a process could be implemented using 
kill().

The solution is to write your long-running task so that it can be cancelled 
using a synchronization object (such as an Event).

----------
nosy: +pitrou
status: open -> closed

_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11724>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to