This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author dmick
Recipients Joe.Julian, benjamin.peterson, dmick, doko, neologix, pitrou, vstinner
Date 2014-11-20.02:56:02
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1416452163.3.0.245970726012.issue21963@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2014-11-20 02:56:03dmicksetrecipients: + dmick, doko, pitrou, vstinner, benjamin.peterson, neologix, Joe.Julian
2014-11-20 02:56:03dmicksetmessageid: <1416452163.3.0.245970726012.issue21963@psf.upfronthosting.co.za>
2014-11-20 02:56:03dmicklinkissue21963 messages
2014-11-20 02:56:02dmickcreate