Taking Asynchronous Python to the Next Level Using Trio
summary
Practical tour of Trio that focuses on concrete APIs and behaviors: structured concurrency with nurseries and start_soon that guarantee children finish before parent, cooperative multitasking via checkpoints, cancellation and timeouts with move_on_after and CancelScope, aggregated errors handled as Python 3.11 exception groups, channels and semaphores for synchronization, SSL stream and Trio Path (pathlib) for nonblocking IO, trio-asyncio adapters, run_sync_in_thread with thread naming, and new testing helpers race_group and matchers.
AI-written summary · about
chapters (11)
- 0:00Introduction to Trio
- 1:24Nurseries and task spawning
- 3:03Checkpoints in Trio
- 4:41Error handling and groups
- 6:01Timeouts and cancellation
- 7:32Communication and synchronization
- 9:34IO and streams
- 11:58Trio vs. Asyncio
- 13:34Design and migration
- 17:13Recent features and updates
- 25:13Conclusion and takeaways
related talks
47mTaking Asynchronous Python to the Next Level Using Trio
32mTrio: Async concurrency for mere mortals
15mEvent-Driven asyncio: A Case Study of Trio's API
26mWhy I reimplemented Trio in a game engine
01h 21mTUTORIAL: Async Python, Good it is
01h 00mCoroutine Concurrency in Python 3 with asyncio
30m"Asyncio by Example"
30mLet's get you started with asynchronous programming
