6 ms·
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 ba
by ch0wn 14y ago
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 http://flask.pocoo.org/docs/design/#thread-locals
- obiterdictum 14y agoIt should be noted that thread locals play well with greenlets, so it works well with gevent-style asynchronous servers.
- the_mitsuhiko 14y agoWe have builtin support for greenlet concurrency even without monkey patching I should add :-)
- irrationalidiom 14y agoI want to thank the flask team for this. we are using flask + gevent in production and it has been highly performant (1200 requests a second for our app) and stable :-)
- balac 14y agoAre you running that on a single server? Care to share the specs?
- swah 14y agoI feel sad to read remarks like this one :) If you have a large application, should you use what, Spring? If you use Spring, you'll have a large application.
- brown9-2 14y agoI haven't used Flask for a large application, but I'm curious why it would be bad for a large application - are there not enough features built in? What would Python developers prefer to use for a large application - Django?
- chasingtheflow 14y agoOr perhaps Pyramid http://www.pylonsproject.org/ http://www.pylonsproject.org/