ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> python-list
python-list
Re: Cancelling a python thread (revisited...)
by exarkun other posts by this author
Nov 8 2009 5:51AM messages near this date
Re: Cancelling a python thread (revisited...) | Re: Cancelling a python thread (revisited...)
On 12:40 pm, sven@[...].de wrote:
> On Nov 8, 4:27�am, Carl Banks <pavlovevide...@[...].com> wrote:
> >It doesn't sound like the thread is communicating with the process
> >much. �Therefore:
> 
> There is quite a bit of communication -- the computation results are
> visulized while they are generated.

I'm curious how this visualization works, since earlier you said 
something to the affect that there were no shared resources.  If you 
kill a thread and it had opened a window and was drawing on it, with 
most toolkits, you'll end up with a window stuck in your screen, won't 
you?
> [snip]
> 
> I really don't get that.  If the reason would be that it is too much
> work to
> implement, then I could accept it.  But saying: We know it is useful,
> but we
> won't allow to do it, just does not seem reasonable.  Thread
> cancellation
> might be generally unsafe, but there are cases when it is safe.  It
> should be
> up to the user to decide it.  There are many things that do harm if
> you don't
> use them correctly, and of course it would be a bad idea to remove all
> of
> them from Python.

The CPython philosophy sort of follows the guideline that you should be 
allowed to do bad stuff if you want, except when that bad stuff would 
crash the interpreter (clearly ctypes is an exception to this rule of 
thumb).  I think this is the argument that has been applied in 
opposition to adding thread termination in the past, though I don't 
remember for sure.

Jean-Paul
Thread:
Sven Marnach
Carl Banks
Antoine Pitrou
John Nagle
Sven
Antoine Pitrou
John Nagle
Antoine Pitrou
Sven
exarkun
John Nagle

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved