Thread A runs x.store(1, std::memory_order_release)
first, then thread B runs x.load(std::memory_order_acquire)
.x
in thread B is not guaranteed to read 1 stored by A.
If I use memory_order_seq_cst
, will it be guaranteed to read 1?
Thread A runs x.store(1, std::memory_order_release)
first, then thread B runs x.load(std::memory_order_acquire)
.x
in thread B is not guaranteed to read 1 stored by A.
If I use memory_order_seq_cst
, will it be guaranteed to read 1?