You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Originally reported by: Alexey Luchko (Bitbucket: soulne4ny, GitHub: soulne4ny)
Hi!
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.
Original comment byJoel Rivera (Bitbucket: cyraxjoe, GitHub: cyraxjoe):
I have just experience exactly the same issue and you are right, the thread that execute SvcStop is not the main thread as a work around tried to communicate trough an event and it worked:
Original comment byJoel Rivera (Bitbucket: cyraxjoe, GitHub: cyraxjoe):
Bugfix of a potential deadlock if the main bus is stopped from a different
thread than the main thread, this is the case when is implemented as a
windows service.
Originally reported by: Alexey Luchko (Bitbucket: soulne4ny, GitHub: soulne4ny)
Hi!
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
The text was updated successfully, but these errors were encountered: