How Flask saves a global threadsafe request

In a flask, each function has access to a global query. How do bulb designers stop this global from being rewritten in the middle of one request when another starts?

+6
source share
1 answer

This is a stream, not a true global one. Since each thread can only process one request at a time, there is no risk of interference.

There is actually a full description of exactly this in the Flask docs here .

(However, this does not necessarily make it a good design).

+7
source

Source: https://habr.com/ru/post/969478/


All Articles