smang
smang

Reputation: 1207

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

Upvotes: 6

Views: 1128

Answers (1)

Martijn Pieters
Martijn Pieters

Reputation: 1121196

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.

Upvotes: 9

Related Questions