Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying The Rust Programming Handbook
  • Table Of Contents Toc
The Rust Programming Handbook

The Rust Programming Handbook

By : Francesco Ciulla
close
close
The Rust Programming Handbook

The Rust Programming Handbook

By: Francesco Ciulla

Overview of this book

The Rust Programming Handbook is a deeply engaging and meticulously crafted book designed to immerse programmers into the intricate world of Rust’s core principles and sophisticated features. This book not only enhances your coding skills but also prepares you to tackle complex challenges in software development, optimizing your code for better performance and reliability. You will explore Rust’s powerful concurrency models, rigorous memory safety guarantees, and its versatile trait system. Discover the foundational elements that make Rust a standout language for developing safe and efficient applications. The book will show you how these core principles can seamlessly transition into real-world applications. You will learn how to apply Rust's capabilities to systems programming and web development, extending the reach of its safety and efficiency benefits across different programming domains. Whether it's creating low-level system components or high-performance web services, the book provides practical examples to integrate Rust effectively into a variety of projects. Elevate your coding skills and become a sought-after professional in the tech industry with this essential guide. Rust from Beginner to Professional is your definitive toolkit for mastering advanced Rust programming techniques and writing high-quality code.
Table of Contents (20 chapters)
close
close
18
Other Books You May Enjoy
19
Index

Sharing data safely between threads

This is such an important aspect of concurrent programming! When you have multiple threads running, they often need to access or change the same data.

Without proper safeguards, this can lead to serious issues and bugs that can be extremely difficult to identify. Rust, with its strong focus on safety, offers great tools to help manage shared data safely and effectively.

The perils of unsafe shared state

Why is sharing data between threads so tricky? The core issue is shared mutable state. If multiple threads can read and write to the same memory location at the same time without any coordination, you can run into several problems, the most common being the following:

  • Data races: This happens in the following cases:
    1. Two or more threads concurrently access a location in memory.
    2. At least one of the accesses is a write.
    3. The accesses are not synchronized. The result is unpredictable behavior because...
CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
The Rust Programming Handbook
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon