question about ctrl-d and atexit with threads

skip at pobox.com skip at pobox.com
Thu Mar 5 12:02:53 EST 2009


What happens if you simply call

    my_thread.setDaemon(True)

(or in Python 2.6):

    my_thread.daemon = True

?  That is the documented way to exit worker threads when you want the
application to exit.  From the threading module docs:

    "The entire Python program exits when no alive non-daemon threads are
    left."

Skip



More information about the Python-list mailing list