answer: use Trio (or AnyIO if you're stuck in the asyncio land) and get sane cancel mechanics built-in.
I love how C# came up with this a decade ago and everyone else is slowly catching on.
answer: use Trio (or AnyIO if you're stuck in the asyncio land) and get sane cancel mechanics built-in.