# Concurrent Programming Primer, for CPython Developers

*Note: this document was written with extensive LLM agent assistance.*

This primer explains concurrent C programming and the mechanisms used by
free-threaded CPython. Chapters 1–8 cover general concepts, chapters 9–13 cover
CPython, and chapter 14 helps you choose a technique.

Start with [shared mutable memory](01-shared-mutable-memory.md), or use the
[contents and topic index](contents.md) to find a specific subject. The
[glossary](glossary.md) defines concurrency terms and links to relevant sections.
For books, articles, talks, and reference material, see [further reading](further-reading.md).

## Contents

1. [The basic problem: shared mutable memory](01-shared-mutable-memory.md)
2. [The C abstract machine and undefined behavior](02-the-c-abstract-machine-and-undefined-behavior.md)
3. [The C memory model](03-the-c-memory-model.md)
4. [Atomic operations](04-atomic-operations.md)
5. [Synchronization](05-synchronization.md)
6. [Concurrency and performance](06-concurrency-and-performance.md)
7. [Lock-free algorithms](07-lock-free-algorithms.md)
8. [Safe memory reclamation](08-safe-memory-reclamation.md)
9. [CPython's concurrency model](09-cpython-concurrency-model.md)
10. [`PyMutex`](10-pymutex.md)
11. [CPython critical sections](11-cpython-critical-sections.md)
12. [Stop-the-world](12-stop-the-world.md)
13. [QSBR in CPython](13-qsbr-in-cpython.md)
14. [Choosing a technique](14-choosing-a-technique.md)

The source for this site is on [GitHub](https://github.com/nascheme/cpython-guidance).


