In this chapter, we covered the remainder of the essential non-atomic Rust synchronization primitives, doing a deep-dive on the postmates/hopper libraries to explore their use in a production code base. After having digested Chapter 4, Sync and Send – the Foundation of Rust Concurrency, and this chapter, the reader should be in a fine position to build lock-based, concurrent data structures in Rust. For readers that need even more performance, we'll explore the topic of atomic programming in Chapter 6, Atomics – the Primitives of Synchronization, and in Chapter 7, Atomics – Safely Reclaiming Memory.
If you thought lock-based concurrency was hard, wait until you see atomics.