News for hackers. Stuff that matters.
Re:Latency in Asynchronous Python by qq11ww22ee33 on Sunday May 24, 2020 @05:41AM (#23290388)
> Never, ever use unbounded queues. In fact every unbounded asyncio.Queue() is a bug. It’s a serious API defect that asyncio allows unbounded queues to be created at all.

asyncio is very poorly designed overall. This is just one offender.

> asyncio.sleep(0) is nearly always wrong.

This, however, is VERY bad advice. a sleep(0) (or, a checkpoint as it is better called) is very useful in things like branches where asynchronous operations only run in one branch. This ensures you don't end up deadlocking half your app if your branches go wrong.

There are no comments on this comment yet.