Message132658
| Author |
pitrou |
| Recipients |
bquinlan, jenisys, pitrou |
| Date |
2011年03月31日.12:06:29 |
| SpamBayes Score |
0.004481547 |
| Marked as misclassified |
No |
| Message-id |
<1301573190.05.0.922412783892.issue11724@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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). |
|
History
|
|---|
| 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 |
|