I am current developing an application using flask, and I noticed that many existing projects use the THREADS_PER_PAGE flag in their config.py (i.e. Here and Here).
The first link describes THREADS_PER_PAGE as application threads and suggests using two threads per core (one for handling incoming requests and the other for performing background operations).
I have glanced through the flask source, and I haven't been able to find any reference to a threads_per_page configuration option. Would anyone be able to describe the purpose of THREADS_PER_PAGE, and if it actually necessary (what does it default to if it is not specified).
The parameter is not used by the current Flask version, nor was it ever used in the past.
Flask is a WSGI app, and relies on the WSGI server to handle concurrency. For development the Werkzeug server is used, but it too does not use that configuration variable.
The only reference I can find to the parameter was on a now deleted Flask project Wiki page; the parameter is mentioned without further comment. All other sources appear to have taken it from there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With