From 92b86d7eac326e6ff362f771545a1091d3da8bb4 Mon Sep 17 00:00:00 2001 From: Bulat Musin <9249387+bmusin@users.noreply.github.com> Date: Thu, 11 Jan 2018 09:31:25 +0300 Subject: [PATCH] fix typo thread-safe --- first-edition/src/concurrency.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/first-edition/src/concurrency.md b/first-edition/src/concurrency.md index 0fd71ee6d..a8af9cad7 100644 --- a/first-edition/src/concurrency.md +++ b/first-edition/src/concurrency.md @@ -237,7 +237,7 @@ This won't work, however, and will give us the error: ``` As the error message mentions, `Rc` cannot be sent between threads safely. This -is because the internal reference count is not maintained in a thread safe +is because the internal reference count is not maintained in a thread-safe manner and can have a data race. To solve this, we'll use `Arc`, Rust's standard atomic reference count type. @@ -288,7 +288,7 @@ involved—can cause data races! Usually when we wish to make something in an immutable position mutable, we use `Cell` or `RefCell` which allow safe mutation via runtime checks or otherwise (see also: [Choosing Your Guarantees](choosing-your-guarantees.html)). -However, similar to `Rc`, these are not thread safe. If we try using these, we +However, similar to `Rc`, these are not thread-safe. If we try using these, we will get an error about these types not being `Sync`, and the code will fail to compile.