Message132658
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). |
|
Date |
User |
Action |
Args |
2011-03-31 12:06:30 | pitrou | set | recipients:
+ pitrou, bquinlan, jenisys |
2011-03-31 12:06:30 | pitrou | set | messageid: <1301573190.05.0.922412783892.issue11724@psf.upfronthosting.co.za> |
2011-03-31 12:06:29 | pitrou | link | issue11724 messages |
2011-03-31 12:06:29 | pitrou | create | |
|