-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
Documentation on Ordering::AcqRel
states:
AcqRel
When coupled with a load, uses `Acquire` ordering, and with a store `Release` ordering.
However, this code
use std::sync::atomic::{AtomicBool, Ordering};
fn main() {
let b = AtomicBool::new(false);
b.store(true, Ordering::AcqRel);
b.load(Ordering::AcqRel);
}
panics on both store and load (if the call to store() is commented out)
thread 'main' panicked at 'there is no such thing as an acquire/release store', /checkout/src/libcore/sync/atomic.rs:1482:19
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Either documentation should be updated to describe why this is not relevant to store/load, or implementation should be fixed to actually deliver on the promise.
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.