Concurrent and Parallel Programming in Rust: Threads, Async, and Lock-Free Patterns

· Modern Systems Programming with Rust Book 2 · Dorian Reed
1 review
Ebook
528
Pages
Tools

About this ebook

Master the art of fearless concurrency and build blazing-fast, memory-safe systems with Rust.

Modern software demands maximum performance. From high-performance database engines to massive web servers, extracting every ounce of power from multi-core processors is no longer optional. But concurrent programming is notoriously difficult, plagued by data races, deadlocks, and unpredictable memory corruption. Rust changes the rules.

Concurrent and Parallel Programming in Rust is the definitive guide for intermediate developers and systems programmers who want to master multithreading, asynchronous architectures, and lock-free data structures. By leveraging Rust's strict ownership model and borrow checker, you will learn how to design complex concurrent systems that are mathematically proven to be free of data races before they even compile.

This book strips away the abstractions to reveal exactly how your code interacts with the operating system scheduler, CPU caches, and hardware memory controllers. You will move systematically from foundational threading concepts to the most advanced, ultra-low-latency lock-free patterns used in production.


Inside, you will discover how to:

Manage operating system threads, configure stack sizes, and safely transfer data ownership using message-passing channels.

Optimize Mutex and read-write locks, avoid deadlocks through strict lock ordering, and conquer the physical realities of lock contention.

Utilize work-stealing schedulers and the Rayon crate to distribute heavy computational workloads perfectly across physical CPU cores.

Demystify the async/await model, understand cooperative multitasking, and build scalable network services using executors like Tokio without blocking your threads.

Master atomic variables, compare-and-swap loops, epoch-based memory reclamation, and strict memory ordering semantics to eliminate operating system bottlenecks.

Implement bulkheads, backpressure, load shedding, and graceful shutdown sequences to ensure your architecture survives the chaos of real-world deployment.


Stop guessing about thread safety. Equip yourself with the mechanical sympathy and architectural discipline required to engineer the world's most demanding software. Transform the terrifying complexity of concurrency into a predictable, high-performance asset.

Master the art of fearless concurrency and build blazing-fast, memory-safe systems with Rust. Modern software demands maximum performance. From high-performance database engines to massive web servers, extracting every ounce of power from multi-core processors is no longer optional. But concurren...

Discover more

Ratings and reviews

1 review

Rate this ebook

Tell us what you think.

Reading information

Smartphones and tablets
Install the Google Play Books app for Android and iPad/iPhone. It syncs automatically with your account and allows you to read online or offline wherever you are.
Laptops and computers
You can listen to audiobooks purchased on Google Play using your computer's web browser.
eReaders and other devices
To read on e-ink devices like Kobo eReaders, you'll need to download a file and transfer it to your device. Follow the detailed Help Center instructions to transfer the files to supported eReaders.