9

cross-posted from: https://discuss.online/post/5803977

About this Book

The Rust programming language is extremely well suited for concurrency, and its ecosystem has many libraries that include lots of concurrent data structures, locks, and more. But implementing those structures correctly can be difficult. Even in the most well-used libraries, memory ordering bugs are not uncommon.

In this practical book, Mara Bos, team lead of the Rust library team, helps Rust programmers of all levels gain a clear understanding of low-level concurrency. You’ll learn everything about atomics and memory ordering and how they're combined with basic operating system APIs to build common primitives like mutexes and condition variables. Once you’re done, you’ll have a firm grasp of how Rust’s memory model, the processor, and the role of the operating system all fit together.

With this guide, you’ll learn:

  • How Rust's type system works exceptionally well for programming concurrency correctly
  • All about mutexes, condition variables, atomics, and memory ordering
  • What happens in practice with atomic operations on Intel and ARM processors
  • How locks are implemented with support from the operating system
  • How to write correct code that includes concurrency, atomics, and locks
  • How to build your own locking and synchronization primitives correctly

Available free of charge. But I doubt I'll ever read it. Never enough time and energy for everything.

you are viewing a single comment's thread
view the rest of the comments
[-] nmtake@lemm.ee 3 points 3 months ago

Oh I didn't know the book is freely available under the CC license; I bought the Japanese translated version just a week ago. The book is quite difficult for me but the first chapter was very good read.

this post was submitted on 03 Mar 2024
9 points (84.6% liked)

Learning Rust and Lemmy

231 readers
2 users here now

Welcome

A collaborative space for people to work together on learning Rust, learning about the Lemmy code base, discussing whatever confusions or difficulties we're having in these endeavours, and solving problems, including, hopefully, some contributions back to the Lemmy code base.

Rules TL;DR: Be nice, constructive, and focus on learning and working together on understanding Rust and Lemmy.


Running Projects


Policies and Purposes

  1. This is a place to learn and work together.
  2. Questions and curiosity is welcome and encouraged.
  3. This isn't a technical support community. Those with technical knowledge and experienced aren't obliged to help, though such is very welcome. This is closer to a library of study groups than stackoverflow. Though, forming a repository of useful information would be a good side effect.
  4. This isn't an issue tracker for Lemmy (or Rust) or a place for suggestions. Instead, it's where the nature of an issue, what possible solutions might exist and how they could be or were implemented can be discussed, or, where the means by which a particular suggestion could be implemented is discussed.

See also:

Rules

  1. Lemmy.ml rule 2 applies strongly: "Be respectful, even when disagreeing. Everyone should feel welcome" (see Dessalines's post). This is a constructive space.
  2. Don't demean, intimidate or do anything that isn't constructive and encouraging to anyone trying to learn or understand. People should feel free to ask questions, be curious, and fill their gaps knowledge and understanding.
  3. Posts and comments should be (more or less) within scope (on which see Policies and Purposes above).
  4. See the Lemmy Code of Conduct
  5. Where applicable, rules should be interpreted in light of the Policies and Purposes.

Relevant links and Related Communities


Thumbnail and banner generated by ChatGPT.

founded 4 months ago
MODERATORS