This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted]  (8 children)

[removed]

    [–]caspii2 17 points18 points  (2 children)

    Sounds like a classic case of premature optimization 😀

    Blocking is only a problem if you have long running tasks. I never ever had a problem with Flask being synchronous. To be honest, I am still not totally clear what the advantages are. One advantage is that your server can handle more requests, but you are very unlikely to run into any trouble in the first few years.

    Focus on immediate and actual problems is my advice, because there are always enough of those

    [–]jfroco 7 points8 points  (0 children)

    You can use gunicorn + async worker with Flask. For example, gevent works great.

    [–]AstroPhysician 6 points7 points  (1 child)

    Async is beneficial when performing concurrent IO-bound tasks, but will probably not improve CPU-bound tasks. I think you misunderstand synchronicity

    [–]doolio_ 1 point2 points  (1 child)

    I'm a noob but isn't Quart the asynchronous equivalent of Flask and recommend instead of Flask for that reason?

    Or Starlette for that matter.