Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Discussion options

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.

You must be logged in to vote

Replies: 0 comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.