-
-
Notifications
You must be signed in to change notification settings - Fork 203
-
In the following Quart documentation:
https://quart.palletsprojects.com/en/latest/how_to_guides/sync_code.html
It states that Quart can handle running sync code in a thread pool executor such that it will not block the event loop for your async routes.
Conveniently, any route that is simply defined with def instead of async def will be automatically run in a thread pool executor.
I have a large Flask application that needs one and only one route to be run with websockets, and I would thus like to do it in ASGI.
Would it be sensible to convert this entire application to Quart, and leave all of my routes as def, and only convert this one route to async def ?
Or, are there going to be major downsides doing it this way, that would make it more sensible to split out this route as its own microservice?
If so, what are the downsides to running a large amount of sync code in Quart's thread pool executor?
Thank you.
Beta Was this translation helpful? Give feedback.