> > "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: http://www.quepublishing.com/articles/article.asp?p=26044&seqNum=8&rl=1 http://groups.google.com/group/comp.lang.python/browse_thread/thread/3da7545c655bd769 http://groups.google.com/group/comp.lang.python/browse_thread/thread/e8551fad6e06421f http://groups.google.com/group/comp.lang.python/browse_thread/thread/ffa4edeca2a4fd60 http://mail.python.org/pipermail/python-list/2003-May/202288.html http://groups.google.com/group/comp.lang.python/browse_thread/thread/8262b6e68481f1f9 hope this helps! -- wes - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "Core Python Programming", Prentice Hall, (c)2007,2001 http://corepython.com wesley.j.chun :: wescpy-at-gmail.com python training and technical consulting cyberweb.consulting : silicon valley, ca http://cyberwebconsulting.com _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor