Closed
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.