# 关于

Rust 编程语言非常适合并发，而且它的生态系统中有许多库，其中包括许多并发数据结构、锁等等。但是正确地实现这些结构可能是困难的。即使在最常用的库中，内存排序错误也并不少见。

在这本实用的书中，Rust 库团队的团队负责人 Mara Bos 帮助所有级别的 Rust 程序员清楚地了解基础并发。您将学习有关原子和内存排序的所有知识，以及如何将它们与操作系统基础 API 结合起来构建互斥锁和条件变量等常见原语。完成之后，您将牢牢掌握 Rust 的内存模型、处理器和操作系统的角色是如何组合在一起的。

有了这个指南，你会学到：

* Rust 的类型系统如何正确的在编程并发性方面异常出色地工作
* 所有关于互斥对象、条件变量、原子和内存排序的内容
* 在 Intel 和 ARM 处理器上的原子操作实践中发生了什么
* 如何在操作系统的支持下实现锁
* 如何编写包括并发、原子和锁在内的正确代码
* 如何正确构建自己的锁和同步原语


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://chapin666.gitbook.io/rust-atomics-and-locks/guan-yu.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
