[Tutor] help with Tkinter, please

wesley chun wescpy at gmail.com
Tue Nov 28 11:16:42 CET 2006

> > "The entire Python program exits when no active non-daemon threads
> > are left."
> why do you recommend the use of daemons here?
> Wouldn't that just leave a load of silently running daemon
> threads eating up resources after the main program finishes?
> I don't see the logic of that one? I'd have thought you wanted
> to be sure all application threads died when the app died?
> What am I missing?

are you missing something?  :-) i think there is a distinction bewteen
a daemon/server process and daemon threads.  i don't think that daemon
threads are spawned to a different process, save perhaps the ones
started from C.

i believe that as soon as there are only daemon threads left (a
complementary statement to the doc line above for Thread objects), the
Python interpreter will exit, killing them all. i think Python threads
are very similar to Java threads, but i'll let the thread experts
chime in here.

in the meantime, i googled for some references and found some good
(but perhaps long) reading:

hope this helps!
-- wes
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca

More information about the Tutor mailing list