/rust-atomics-and-locks

Code examples, data structures, and links from my book, Rust Atomics and Locks.

Primary LanguageRustOtherNOASSERTION

This repository contains the code examples, data structures, and links from Rust Atomics and Locks.

The examples from chapters 1, 2, 3, and 8 can be found in examples/. The data structures from chapters 4, 5, 6, and 9 can be found in src/.

Chapter 1 — Basics of Rust Concurrency

Chapter 2 — Atomics

Chapter 3 — Memory Ordering

Chapter 4 — Building Our Own Spin Lock

Chapter 5 — Building Our Own Channels

Chapter 6 — Building Our Own “Arc”

Chapter 7 — Understanding the Processor

Chapter 8 — Operating System Primitives

Chapter 9 — Building Our Own Locks

Chapter 10 — Ideas and Inspiration

License

You may use all code in this repository for any purpose.

Attribution is appreciated, but not required. An attrubution usually includes the book title, author, publisher, and ISBN. For example: "Rust Atomics and Locks by Mara Bos (O’Reilly). Copyright 2023 Mara Bos, 978-1-098-11944-7."