Post #2261672
2026-03-08 00:57 UTC
@ptmcg@fosstodon.org I feel compelled to contribute!
- asyncio.TaskGroup was added to the stdlib in 3.11, being a wholly different (and strictly better!) way of doing async, making it much easier to understand & reason about, and unlike regular async code, able to reliably catch errors, etc. These features are the stdlib's improved version of Trio's nurseries, as justified in a seminal and mind-blowing article: Notes on Structured Concurrency https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/
Replies (1)
-
@ptmcg@fosstodon.org 2026-03-08 02:10
@tartley@fosstodon.org Thanks for posting the article. `asyncio` has been off my radar for a while, but I'm delving into it more and more these days. Another recent addition is `asyncio.to_thread()`. It's a nice way to async-ify a synchronous call, though its really just a convenience form of `asyncio.run_in_executor()`. I've looked at `TaskGroup` a little, but I'll revisit after I read your article in a little more depth.