---
title: "Chapter 22: Fearless Concurrency"
description: "The 6 lessons of chapter 22: Fearless Concurrency, in teaching order."
url: "https://learnrust.net/chapter-22/"
last_updated: "2026-06-13"
---

# Chapter 22: Fearless Concurrency

- [22.1 Threads](https://learnrust.net/chapter-22/threads.md): Running code concurrently with thread::spawn, joining handles to wait for results, and why spawned closures usually need move.
- [22.2 Message passing: channels](https://learnrust.net/chapter-22/message-passing-channels.md): Threads communicating by sending values through an mpsc channel, where send moves ownership and the compiler prevents use-after-send.
- [22.3 Shared state: Mutex and Arc](https://learnrust.net/chapter-22/shared-state-mutex-and-arc.md): Sharing the same data across threads safely: Mutex for exclusive access via locking, and Arc for thread-safe shared ownership.
- [22.4 Send and Sync](https://learnrust.net/chapter-22/send-and-sync.md): The two marker traits the compiler uses to decide what's safe to move or share between threads, and why concurrency safety is automatic.
- [22.5 Data parallelism with rayon](https://learnrust.net/chapter-22/data-parallelism-with-rayon.md): Turning a sequential iterator into a parallel one by changing iter to par_iter, and the ecosystem victory lap of adding one dependency.
- [22.x Chapter 22 summary and quiz](https://learnrust.net/chapter-22/chapter-22-summary-and-quiz.md): Review of threads, channels, Mutex and Arc, the Send and Sync marker traits, and rayon, with a capstone parallel computation.

## Sitemap

See the full [sitemap](https://learnrust.net/sitemap.md) for all pages.
