by qq11ww22ee33 · 6y ago · 0 comments
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.
No comments yet.