{"slug": "trio", "name": "Trio", "category": "dev-libs", "category_name": "Libraries and frameworks", "description": "", "recommenders": 5, "commenters": 6, "warners": 0, "score": 3.954, "rising": -0.31, "first": "2025-11-26", "latest": "2026-09-12", "why": "I'd really have liked to see something like [Trio]", "why_is_quote": true, "has_verdict": false, "sentiment": {"recommend": 6, "neutral": 1, "compare": 1, "warn": 0}, "spark": [1, 0, 0, 1, 2, 1, 0, 0, 0, 0, 1, 0], "listed": true, "loved": [], "caveat": "", "short_quote": "I'd really have liked to see something like [Trio]", "kind": "", "icon": true, "domain": null, "github_repo": null, "official_url": "https://trio.readthedocs.io", "pricing": "", "aliases": ["Trio"], "verdict": null, "praise": [{"label": "", "summary": "", "quotes": [{"id": 794674816, "item_id": 49667176, "url": "https://news.ycombinator.com/item?id=49667176", "by": "spankalee", "date": "2026-09-12", "stance": "recommend", "quote": "I choose mostly Trio with a bit of JavaScript", "excerpt": "Wow, this is really helpful and timely! I'm building a new language with async/await and had to make a lot of these decisions, but I didn't have this organized of a framework to ground myself in. I'm happy to see it clearly that I choose mostly Trio with a bit of JavaScript. My language (Zena's) async docs page: https://zena-lang.dev/guide/async/ I think I might do a pass and try to call out the decision points more ", "context": "Building a new programming language", "use_case": "Python async concurrency", "switched_from": "", "story": "A Design Space Exploration of Async/Await"}, {"id": 766482368, "item_id": 47905148, "url": "https://news.ycombinator.com/item?id=47905148", "by": "quietbritishjim", "date": "2026-04-25", "stance": "recommend", "quote": "In Trio (an excellent Python alternative to asyncio)", "excerpt": "> all those tiny little promises add tiny delays in the form of many tasks. That depends on the language/framework. In some languages, `await foo()` is equivalent to `Future f = foo(); await f`. In others (e.g. Python), it's a primitive operation and you have to use a different syntax if you want to create a future/task. In Trio (an excellent Python alternative to asyncio), there isn't even the concept of a future at", "context": "", "use_case": "", "switched_from": "", "story": "What Async Promised and What It Delivered"}, {"id": 760355616, "item_id": 47522226, "url": "https://news.ycombinator.com/item?id=47522226", "by": "quietbritishjim", "date": "2026-03-25", "stance": "recommend", "quote": "Using structured concurrency [1] as introduced in Python Trio [2] genuinely does help write much simpler concurrent code.", "excerpt": "Using structured concurrency [1] as introduced in Python Trio [2] genuinely does help write much simpler concurrent code. Also, as noted in that Simon Tatham article, Python makes choices at the language level that you have to fuss over yourself in C++. Given how different Trio is from asyncio (the async library in Python's standard library), it seems to me that making some of those basic choices wasn't actually that", "context": "", "use_case": "", "switched_from": "", "story": "Looking at Unity made me understand the point of C++ coroutines"}, {"id": 753469552, "item_id": 47091847, "url": "https://news.ycombinator.com/item?id=47091847", "by": "Groxx", "date": "2026-02-20", "stance": "recommend", "quote": "I'd really have liked to see something like [Trio]", "excerpt": "Yeah, I'd really have liked to see something like [Trio](https://trio.readthedocs.io/en/stable/) gain mid more attention in Python. Structured approaches can prevent a huge amount of those issues, and Python code is absolutely riddled with concurrency problems in my experience. Much more so in practice than other languages except maybe javascript (when including async ordering mistakes). It makes it a real nightmare ", "context": "", "use_case": "Python structured concurrency", "switched_from": "", "story": "Using go fix to modernize Go code"}, {"id": 736910400, "item_id": 46056900, "url": "https://news.ycombinator.com/item?id=46056900", "by": "nikcub", "date": "2025-11-26", "stance": "recommend", "quote": "the trio library has an excellent tutorial", "excerpt": "the trio library has an excellent tutorial that explains all of these concepts[0] even if you don't use trio and stick to the core python libs it's worth reading: https://trio.readthedocs.io/en/stable/tutorial.html", "context": "", "use_case": "Python async concurrency", "switched_from": "", "story": "Await Is Not a Context Switch: Understanding Python's Coroutines vs. Tasks"}]}], "caveats": [], "who": [{"by": "spankalee", "context": "Building a new programming language", "url": "https://news.ycombinator.com/item?id=49667176", "date": "2026-09-12"}], "tags": [], "use_cases": ["python async concurrency", "async concurrency in python", "python structured concurrency"], "compared": [], "makers": [], "threads": [{"url": "https://news.ycombinator.com/item?id=47472566", "title": "Looking at Unity made me understand the point of C++ coroutines", "mentions": 2}, {"url": "https://news.ycombinator.com/item?id=49626718", "title": "A Design Space Exploration of Async/Await", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=48929587", "title": "The Tokio/Rayon Trap and Why Async/Await Fails Concurrency", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47859442", "title": "What Async Promised and What It Delivered", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47630592", "title": "Async Python Is Secretly Deterministic", "mentions": 1}, {"url": "https://news.ycombinator.com/item?id=47049479", "title": "Using go fix to modernize Go code", "mentions": 1}], "sentiment_by_month": {"2025-11": {"recommend": 1}, "2025-12": {}, "2026-01": {}, "2026-02": {"recommend": 1}, "2026-03": {"recommend": 2}, "2026-04": {"compare": 1, "recommend": 1}, "2026-05": {}, "2026-06": {}, "2026-07": {"neutral": 1}, "2026-08": {}, "2026-09": {"recommend": 1}, "2026-10": {}}, "quotes": [{"id": 794674816, "item_id": 49667176, "url": "https://news.ycombinator.com/item?id=49667176", "by": "spankalee", "date": "2026-09-12", "stance": "recommend", "quote": "I choose mostly Trio with a bit of JavaScript", "excerpt": "Wow, this is really helpful and timely! I'm building a new language with async/await and had to make a lot of these decisions, but I didn't have this organized of a framework to ground myself in. I'm happy to see it clearly that I choose mostly Trio with a bit of JavaScript. My language (Zena's) async docs page: https://zena-lang.dev/guide/async/ I think I might do a pass and try to call out the decision points more ", "context": "Building a new programming language", "use_case": "Python async concurrency", "switched_from": "", "story": "A Design Space Exploration of Async/Await"}, {"id": 782918944, "item_id": 48932434, "url": "https://news.ycombinator.com/item?id=48932434", "by": "quietbritishjim", "date": "2026-07-16", "stance": "neutral", "quote": "It works for simple situations.", "excerpt": "In Python Trio, you would have a thread pool for each type of computation (potentially a \"pool\" of 1 thread shared between all tasks if that works for your application). You would await trio.to_thread.run_sync(...) [1] (pass it a normal non-async function, and a token representing the thread pool). This is a pretty simple wrapper that takes care of queuing the work to the thread pool, waiting for it to complete and f", "context": "", "use_case": "Async concurrency in Python", "switched_from": "", "story": "The Tokio/Rayon Trap and Why Async/Await Fails Concurrency"}, {"id": 766482368, "item_id": 47905148, "url": "https://news.ycombinator.com/item?id=47905148", "by": "quietbritishjim", "date": "2026-04-25", "stance": "recommend", "quote": "In Trio (an excellent Python alternative to asyncio)", "excerpt": "> all those tiny little promises add tiny delays in the form of many tasks. That depends on the language/framework. In some languages, `await foo()` is equivalent to `Future f = foo(); await f`. In others (e.g. Python), it's a primitive operation and you have to use a different syntax if you want to create a future/task. In Trio (an excellent Python alternative to asyncio), there isn't even the concept of a future at", "context": "", "use_case": "", "switched_from": "", "story": "What Async Promised and What It Delivered"}, {"id": 762097153, "item_id": 47631072, "url": "https://news.ycombinator.com/item?id=47631072", "by": "12_throw_away", "date": "2026-04-03", "stance": "compare", "quote": "explicitly randomize startup order", "excerpt": "No, determinstic scheduling is not a property of async python. Yes, the stdlib asyncio event loop does have deterministic scheduling, but that's an implementation detail and I would not rely on it for anything critical. Other event loops - for instance trio [1] - explicitly randomize startup order so that you won't accidentally write code that relies on it. [1] https://github.com/python-trio/trio/issues/32", "context": "", "use_case": "", "switched_from": "", "story": "Async Python Is Secretly Deterministic"}, {"id": 760409424, "item_id": 47525589, "url": "https://news.ycombinator.com/item?id=47525589", "by": "maleldil", "date": "2026-03-25", "stance": "recommend", "quote": "", "excerpt": "Python's stdlib now supports structured concurrency via task groups[1], inspired by Trio's nurseries[2]. [1] https://docs.python.org/3/library/asyncio-task.html#id6 [2] https://github.com/python/cpython/issues/90908", "context": "", "use_case": "", "switched_from": "", "story": "Looking at Unity made me understand the point of C++ coroutines"}, {"id": 760355616, "item_id": 47522226, "url": "https://news.ycombinator.com/item?id=47522226", "by": "quietbritishjim", "date": "2026-03-25", "stance": "recommend", "quote": "Using structured concurrency [1] as introduced in Python Trio [2] genuinely does help write much simpler concurrent code.", "excerpt": "Using structured concurrency [1] as introduced in Python Trio [2] genuinely does help write much simpler concurrent code. Also, as noted in that Simon Tatham article, Python makes choices at the language level that you have to fuss over yourself in C++. Given how different Trio is from asyncio (the async library in Python's standard library), it seems to me that making some of those basic choices wasn't actually that", "context": "", "use_case": "", "switched_from": "", "story": "Looking at Unity made me understand the point of C++ coroutines"}, {"id": 753469552, "item_id": 47091847, "url": "https://news.ycombinator.com/item?id=47091847", "by": "Groxx", "date": "2026-02-20", "stance": "recommend", "quote": "I'd really have liked to see something like [Trio]", "excerpt": "Yeah, I'd really have liked to see something like [Trio](https://trio.readthedocs.io/en/stable/) gain mid more attention in Python. Structured approaches can prevent a huge amount of those issues, and Python code is absolutely riddled with concurrency problems in my experience. Much more so in practice than other languages except maybe javascript (when including async ordering mistakes). It makes it a real nightmare ", "context": "", "use_case": "Python structured concurrency", "switched_from": "", "story": "Using go fix to modernize Go code"}, {"id": 736910400, "item_id": 46056900, "url": "https://news.ycombinator.com/item?id=46056900", "by": "nikcub", "date": "2025-11-26", "stance": "recommend", "quote": "the trio library has an excellent tutorial", "excerpt": "the trio library has an excellent tutorial that explains all of these concepts[0] even if you don't use trio and stick to the core python libs it's worth reading: https://trio.readthedocs.io/en/stable/tutorial.html", "context": "", "use_case": "Python async concurrency", "switched_from": "", "story": "Await Is Not a Context Switch: Understanding Python's Coroutines vs. Tasks"}]}