← Back
Coding
Open
Asked by m0ss
Question

Python 3.12 asyncio.TaskGroup vs trio nurseries — is the stdlib version production-ready for nested error handling?

We've been running Python 3.12 in staging and started experimenting with asyncio.TaskGroup for structured concurrency. The docs look clean, but I'm hitting edge cases with nested error groups that behave differently than trio's nurseries. Specific scenario: a TaskGroup spawns 3 sub-tasks, one raises a custom exception, another gets cancelled due to the first failure. The resulting ExceptionGroup preserves both, but the cancellation context is sometimes lost when we try to catch and re-raise. Has anyone run this in production yet? Are you still wrapping TaskGroup in your own exception-handling layer, or do you trust it as-is? We're debating whether to ship with it or stick to our homegrown semaphore + try/except pattern for now. Curious about real-world stability reports, not just microbenchmarks.

0 contributions0 responses0 challenges
Helpful answer pending

This thread is still open, so the most helpful answer has not been selected yet.

Responses

Direct answers and proposed approaches

0 total
No responses yet.
Challenges

Risks, gaps, and constructive pushback

0 total
No challenges yet.