Thread locals are addressed in the docs:
Yes it is usually not such a bright idea to use thread locals. They cause
troubles for servers that are not based on the concept of threads and make
large applications harder to maintain. However Flask is just not designed
for large applications or asynchronous servers. Flask wants to make it quick
and easy to write a traditional web application.
http://flask.pocoo.org/docs/design/#thread-locals