
amadeusz.jasak at gmail
Aug 19, 2006, 10:24 PM
Post #3 of 3
(183 views)
Permalink
|
|
Re: Stopping all threads from other thread
[In reply to]
|
|
Thanks, it's working Bryan Olson wrote: > amadeusz.jasak[at]gmail.com wrote: > > Hello, > > it is possible to stop all threads (application) from thread of > > application: > > App > > |-MainThread > > |-WebServer > > |-CmdListener # From this I want to stop App > > > > The sys.exit isn't working... > > You can start all threads other than CmdListener as daemon > threads, using threading.Thread.setDaemon(). Then when > CmdListener exits, the program will exit. Python starts with > one, non-daemon thread, and if that's what you are using for > MainThread, you'd have to switch which thread runs what. > > Python deliberately does not offer a threadicide method. > > > -- > --Bryan -- http://mail.python.org/mailman/listinfo/python-list
|