Async and concurrency
On this page5
- Foundations
- Asyncio
- Choosing a model, and offloading
- Coordination
- The 2026 headline
Async and concurrency
Top-three Python backend interview topic. Read in order — each file assumes the previous ones.
Foundations
Asyncio
| # |
File |
Covers |
| 05 |
Asynchronous Python and Coroutines |
async def, awaitables, how a coroutine runs |
| 06 |
Event Loop Internals |
selectors, yield points, uvloop, Python vs JS loops |
| 07 |
Asyncio vs Threads in Python: A Comprehensive Comparison |
the comparison, with hybrid patterns |
| 12 |
TaskGroup and Structured Concurrency |
TaskGroup vs gather, and picking the right primitive |
| 13 |
Cancellation, timeouts and error handling in asyncio |
CancelledError, asyncio.timeout, shield, ExceptionGroup |
| 17 |
anyio and Trio — structured concurrency |
anyio/Trio, and why libraries target them |
Choosing a model, and offloading
Coordination
Runnable examples: _examples/.
The 2026 headline
Free-threaded CPython is officially supported as of Python 3.14 (PEP 779) - no longer experimental, though still an opt-in build. Python 3.14 also added stdlib subinterpreters (PEP 734), so “threads, async, or processes?” is now a four-way question. Covered in The GIL, and free-threaded Python.