top | item 24428608

(no title)

kabacha | 5 years ago

I really don't get this anti-async mentality on HN. Maybe I'm doing something wrong but async is a complete game changer for me as there just so much IO wait in every project I touch. The fact that my program has to stop and wait for something is honestly unacceptable and it's just a logical conclusion to eliminate this blockage.

I worked past 2 years with asyncio and I have to say it still kinda sucks. The syntax is overly verbose and asyncio itself can't decide what it wants to be. However it still works _good_ for the most part and there's an enormous community and effort in this!

discuss

order

BozeWolf|5 years ago

“So much io wait”. What io is your app waiting for? Is it a webserver, or another type of app?

naters|5 years ago

Not the GP, but I'm currently working on a small web app that synchronizes data from 2 other web services, which means that almost every endpoint involves a call to an external API. In some cases, it involves repeated calls to those APIs, but the order in which the responses are received is unimportant, which is an ideal use case for asyncio's gather function. Using a framework (I haven't tried Django's new async views yet, but am using one of the handful of Flask-ish async frameworks) that supports async views has made this a snap, whereas before I would probably have used some sort of out-of-process work queue type setup.