Waiting in Asyncio
hynek.me
Waiting in Asyncio
1–10 of 31 posts
Re: Waiting in Asyncio
#2All these subtleties and gotchas signify, to me, a shit implementation and a fragmented interface. The exact opposite of the Zen of python.
Re: Waiting in Asyncio
#3We've been using Twisted at work for over a decade. We are finally completing our upgrade to python3 after much effort and pain. That means we are starting to look into the native async functions in python3.
What I realized the other day is that Twisted treats everything like an asyncio Task. That seems to make most of the more confusing gotchas just disappear. I suppose it's a matter of what you're used to though.
Re: Waiting in Asyncio
#4All these subtleties and gotchas signify, to me, a shit implementation and a fragmented interface. The exact opposite of the Zen of python.
Can you give a practical example of a library or python subsystem that lives up to the “Zen of python” you are referring to?
Re: Waiting in Asyncio
#5Thanks! I'm definitely going to keep this under my pillow.
Re: Waiting in Asyncio
#6[deleted]
Re: Waiting in Asyncio
#7Trio is a much simpler design that's just as powerful as `asyncio`. It has exactly one way to wait for a task: await it.
For a group of tasks, use a nursery.
Edit: correction
Re: Waiting in Asyncio
#8Re: Waiting in Asyncio
#9All these subtleties and gotchas signify, to me, a shit implementation and a fragmented interface. The exact opposite of the Zen of python.
Can you give a practical example of a library or python subsystem that lives up to the “Zen of python” you are referring to?
There are lots. `requests` is the most famous.
Re: Waiting in Asyncio
#10It's python. ..that took too long to figure out