Killing threads (was Re: Cancel or timeout a long running regular expression)
Chris Angelico
rosuav at gmail.com
Sat Sep 17 19:19:46 EDT 2011
More information about the Python-list mailing list
Sat Sep 17 19:19:46 EDT 2011
- Previous message (by thread): Killing threads (was Re: Cancel or timeout a long running regular expression)
- Next message (by thread): Killing threads (was Re: Cancel or timeout a long running regular expression)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Sep 18, 2011 at 8:27 AM, Chris Rebert <clp2 at rebertia.com> wrote: > It's possible that the reason is analogous to why Java has deprecated > its equivalent, Thread.stop(): > http://download.oracle.com/javase/1.4.2/docs/guide/misc/threadPrimitiveDeprecation.html Interesting. The main argument against having a way to raise an arbitrary exception in a different thread is that it gets around Java's requirement to declare all exceptions that a routine might throw - a requirement that Python doesn't have. So does that mean it'd be reasonable to have a way to trigger a "TerminateThread" exception (like SystemExit but for one thread) remotely? The above article recommends polling a variable, but that's the exact sort of thing that exceptions are meant to save you from doing. ChrisA
- Previous message (by thread): Killing threads (was Re: Cancel or timeout a long running regular expression)
- Next message (by thread): Killing threads (was Re: Cancel or timeout a long running regular expression)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list