[EMAIL PROTECTED] ha escrito:

> def main():
>     threads = []
>     try:
>         for i in range(5):
>             t = StoppableThread()
>             t.start()
>             sleep(0.001)
>             threads.append(t)
>
>
>     except KeyboardInterrupt:
>         for t in threads:
>             t.stop()
>             t.join()
>         del threads[:]
>         print 'child thread exiting...'+'/n/n'

Put a print statement just at the end of main() and see what happens.
You said:

> What I want to do is to start 5 child threads, then do something, then
> when got ^C keyboard exception, stop the child thread.

You've created the threads, you've handled ^C, what's missing...?

-- 
Gabriel Genellina

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to