Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flask THREADS_PER_PAGE configuration

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).

like image 683
smang Avatar asked Aug 16 '14 18:08

smang


1 Answers

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.

like image 131
Martijn Pieters Avatar answered Sep 27 '22 22:09

Martijn Pieters