Try to wait until cherrypy thread stops