question about ctrl-d and atexit with threads
Darren Dale
dsdale24 at gmail.com
Thu Mar 5 12:26:18 EST 2009
On Mar 5, 12:02 pm, s... at pobox.com wrote:
> 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."
Thank you Skip, that solves the problem. I'm still curious what the
difference is between python's handling of sys.exit and EOF, but its
academic at this point.
Thanks again,
Darren
More information about the Python-list
mailing list