Dan Mick added the comment:

Hi; I'm the original author of the code in the Ceph CLI.  

The reason it does what it does is that the Python CLI calls into librados 
(Ceph, through ctypes) to connect to the cluster; that connection can block for 
various reasons, so it's spawned in a thread; after a timeout or ^C, we desire 
to exit, but if we've got a non-daemon thread stuck in Ceph, and no way to 
cancel it from the threading module, sys.exit() will also block waiting for the 
Ceph thread to finally give up.  If, however, we set that thread as a daemon 
thread, it doesn't block the sys.exit() (that being, I thought, the whole point 
of daemon threads).

I confess I don't fully understand the change in 7741d0dd66ca, but it does seem 
to have the side effect of not actually allowing exit while there are 
outstanding daemon threads not hitting Python.

----------
nosy: +dmick

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21963>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to