It is absolutely a ball of mud; asyncio is an embarrassment and what these "easy" introductions never get around to telling you is that it's essentially impossible to write correct asyncio code.
Luckily, Trio now exists. Trio has a consistent and simple story for cleanly handling errors and cancellations. Debugging is still a little difficult, but at least code written with Trio has radically fewer problems to debug.
Comments
It is absolutely a ball of mud; asyncio is an embarrassment and what these "easy" introductions never get around to telling you is that it's essentially impossible to write correct asyncio code.
Luckily, Trio now exists. Trio has a consistent and simple story for cleanly handling errors and cancellations. Debugging is still a little difficult, but at least code written with Trio has radically fewer problems to debug.
Here's a link on the Trio design: https://trio.readthedocs.io/en/stable/design.html
There are some more great articles and talks, but I don't have any links at the ready, sorry.