Summary

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.

Get Hands-On Concurrency with Rust now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.