I'm working on a user-hosted application that needs to periodically check for updates, apply them, then restart.
I have the update checker/installer running in a separate thread, but I can't get it to restart the server. It seems as though calling cherrypy.engine.restart() inside a child thread makes the server hang waiting for that thread to terminate so it can completely shut down. And that thread won't terminate until the restart() call finishes.
Is there a good way to call a server restart from a child thread?