-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Document almost all of atomics. #19108
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
Conversation
/// # Examples | ||
/// | ||
/// ``` | ||
/// use core::atomic::AtomicBool; |
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.
The primary interface for these examples is through std::sync
, so could these imports be written to use that instead?
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.
Yeah, this was the motivation for the IRC discussion. Will update.
4b53d46
to
4f5553a
Compare
Updated! |
4f5553a
to
a2b6d1f
Compare
/// | ||
/// ``` | ||
/// use std::sync::atomic::AtomicPtr; | ||
/// use std::sync::atomic::Ordering; |
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.
Could you also import both of these in the same statement? (use std::sync::atomic::{AtomicPtr, Ordering};
), and above as well.
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.
ahhh yeah.
Thanks @steveklabnik! r=me with one nit |
I don't know enough about the free functions to give them better docs right now.
a2b6d1f
to
40aa833
Compare
I don't know enough about the free functions to give them better docs right now.