On Mon, Nov 3, 2008 at 1:14 PM, Lie Ryan <[EMAIL PROTECTED]> wrote: > On Mon, 03 Nov 2008 14:46:09 +0000, dave selby wrote: > >> Hi All, >> >> Why when I use threads in my app (I know they are evil ...lol) does it >> not stop with ctrl-c, I have to use ctrl-z ? >> >> Cheers >> >> Dave > > Wonder why? Because Ctrl-C merely raises KeyboardInterrupt in the main > thread, breaking the main thread, while leaving the other threads > running. To interrupt a multi-threaded program, you'd need to stop all > running threads.
If you mark the non-main threads as daemon threads then the program will exit without stopping them. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor