-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
std: Improve docs for atomics. Fix two bugs #12954
Conversation
//! | ||
//! let spinlock_clone = spinlock.clone(); | ||
//! spawn(proc() { | ||
//! spinlock_clone.get().store(0, SeqCst); |
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.
If we're writing "ideal code", perhaps this could elide the get()
because of #12900?
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.
(similar elisions could happen in the below examples)
Nice examples! Also good catch on those two bugs |
This adds lots of docs to the atomics module. Two of the examples are using the future atomics API and are ignored temporarily. I discovered a bug in the way AtomicBool's fetch_nand method is implemented and fixed it by using the correct value for `true`. I also fixed the implementation of AcqRel fences (it was only doing a release barrier), and made a "relaxed" fence a failure.
All points addressed. |
This adds lots of docs to the atomics module. Two of the examples are using the future atomics API (relying on `Share`) and are ignored temporarily. I discovered a bug in the way AtomicBool's fetch_nand method is implemented and fixed it by using the correct value for `true`. I also fixed the implementation of AcqRel fences (it was only doing a release barrier), and made a "relaxed" fence a failure.
…cientific notation fixes: rust-lang#12954 changelog: fix [`excessive_precision`] suggestions on float literal written in scientific notation
fix [`excessive_precision`] suggestions on floats written in scientific notation fixes rust-lang#12954 changelog: fix [`excessive_precision`] suggestions on float literal written in scientific notation
This adds lots of docs to the atomics module. Two of the examples
are using the future atomics API (relying on
Share
) and are ignored temporarily.I discovered a bug in the way AtomicBool's fetch_nand method is
implemented and fixed it by using the correct value for
true
.I also fixed the implementation of AcqRel fences (it was only doing
a release barrier), and made a "relaxed" fence a failure.