I use a long thread in a Flask application. In debug mode, when restart is activated, a long thread does not restart when reboot.
Instead, since the code that creates and starts the thread runs after a reboot, each loop creates an additional thread.
How can I prevent this other than shutting down the reloader?
Will the same thing happen when working in mod_wsgi with the autoload function?
Update : a long thread was actually killed by Werkzeug on reboot. There is an extra copy that, due to a reboot, Werkzeug accepts an extra thread that runs the initialization code.
python flask werkzeug wsgi mod-wsgi
jd.
source share