You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
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 ofasync 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 toasync 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.
All reactions