Summary

In this chapter, we discussed the foundations of Rust concurrency—Sync and Send. Furthermore, we started on what makes a primitive thread-safe in Rust and how to build concurrent structures with those primitives. We reasoned through an improperly synchronized program, showing how knowledge of the Rust memory model, augmented by tools such as helgrind, allow us to determine what's gone sideways in our programs. This is, perhaps unsurprisingly to the reader, a painstaking process that is, like as not, prone to error. In Chapter 5, Locks – Mutex, Condvar, Barriers and RWLock, we'll discuss the higher-level coarse synchronization primitives that Rust exposes to the programmer. In Chapter 6, Atomics – the Primitives of Synchronization, we'll discuss the fine synchronization primitives that modern machines expose.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.135.198.174