Part 12
2 chapters
Concurrency
Two chapters on the GIL and performance, and on how asyncio reshapes the patterns.
Chapter 37
The GIL and performance
What the global interpreter lock guarantees and what it leaves to your own lock, how to tell the default build from the free-threaded one, which pool suits CPU-bound rating, and why a benchmark stays out of the tests.
Chapter 38
asyncio and the patterns
How six patterns change when an await is a switch point: a feed closed through aclosing, a session that survives cancellation, quotes in a task group, an async Observer and a command queue that shuts down.