Skip to content

How to best port flask apps to v3 ? #1802

Answered by RobbeSneyders
paketb0te asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @paketb0te,

For processes, you can set the number of workers in the ASGI server.

Threads depends on the Connexion Application you use:

  • FlaskApp: Since Flask is a WSGI app instead of ASGI, we execute any requests passed to the FlaskApp in a thread pool (of 10 workers) automatically. If you define an async routes in the FlaskApp, you're just using Flask async routes within a thread.
  • AsyncApp: The AsyncApp implements ASGI, so here threads are completely replaced by asyncio.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@RobbeSneyders
Comment options

@paketb0te
Comment options

Answer selected by paketb0te
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants