Concurrent requests Flask python -


i have flask application. works database, i'm using sqlalchemy this. have 1 question:

flask handle requests one-by-one. so, example, have 2 users, modifying same record in table of database, example , b (they concurrent).

how can user b user has changed record? must message user b.

in development server version, when app.run(), single synchronous process, means @ 1 requests being processed @ time. cannot accept multiple users @ same time.

however, gunicorn solid, easy-to-use wsgi server let spawn multiple workers (separate processes), , comes asynchronous workers when need deploy application.

however, answer question, since, run on separate threads, data exists in database @ specific time when query run in thread used/returned.

i hope answers query.


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -