๐Ÿ Design Patterns with Python
Home Chapters Examples Diagrams Bibliography GitHub โ†—
  1. Home
  2. Concurrency
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.

Read โ†’
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.

Read โ†’
โ† Previous part Changing Inherited Code Next part โ†’ Putting It Together
Design Patterns with Python
Prose, diagrams and decks: CC BY 4.0. Sample code: Apache 2.0.
Source on GitHub โ†—  ยท  File an issue โ†—