-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Docs for atomic orderings: link to the 'nomicon article for further reading #39200
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @BurntSushi (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
Tidy (in the travis build) failed because:
|
/// If you are confused or don't have enough time to research which ordering to use, use `SeqCst`. | ||
/// Of all the options it has the most unsurpising effect (see the nomicon for details. [1]) | ||
/// The downside is you miss out on several optimizations the other orderings offer. | ||
/// |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just something completely optional I feel would help people (beginners) who have no clue how orderings work and just want to get sample code working.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’d argue that if one is confused/doesn’t have time to research, they should not be writing code involving atomics at all and just use a Mutex
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very good point
Also apoligies if this has been discussed before, but would a |
@steveklabnik I assigned this over to you because you might have opinions on the wording here. |
@DirkyJerky A |
looks good to me, thanks! @bors: r+ rollup |
📌 Commit c0a5b99 has been approved by |
Docs for atomic orderings: link to the 'nomicon article for further reading
No description provided.