Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix minor typo: add missing words "thread safe" in third-arc.md #278

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/third-arc.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ list could get freed too soon!
In order to get thread safety, we have to use *Arc*. Arc is completely identical
to Rc except for the fact that reference counts are modified atomically. This
has a bit of overhead if you don't need it, so Rust exposes both.
All we need to do to make our list is replace every reference to Rc with
`std::sync::Arc`. That's it. We're thread safe. Done!
All we need to do to make our list thread safe is replace every reference to Rc
with `std::sync::Arc`. That's it. We're thread safe. Done!

But this raises an interesting question: how do we *know* if a type is
thread-safe or not? Can we accidentally mess up?
Expand Down