bus deadlock joining main thread
I had to make custom win32 service running cherrypy. While debugging it found that at cherrypy.engine.exit() it hands waiting something (for multiple objects). Log contained "Waiting for thread MainThread." I found Bus.block() waiting for all non-daemon threads at exit.
A workaround could be either tweaking threading.enumerate() before calling engine.exit() or making main thread daemon.
A possible patch attached.
-- Regards, Alex