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