Group all the threads in a list and call the stop method on all of them. On Sun, Aug 24, 2008 at 1:48 AM, BlueBird <[EMAIL PROTECTED]> wrote:
> Hi, > > I have a program with a master thread and several slave threads. > > Whenever an exception occurs, in the master thread or in one of the > slave threads, I would like to interrupt all the threads and the main > program. Threading API does not seem to provide a way to stop a > thread, is there anyway to achieve that ? > > The closest thing I found is thread.interrupt_main() but it's far from > perfect : > - it only allow to interrupt the main thread > - if the main thread is sleeping, it does not interrupt it (at least > on windows) > > cheers, > > Philippe > -- > http://mail.python.org/mailman/listinfo/python-list > -- http://www.goldwatches.com/
-- http://mail.python.org/mailman/listinfo/python-list