Quantcast
Channel: Does memory_order_seq_cst store guarantee that memory_order_relaxed load will read written value? - Stack Overflow
Browsing all 2 articles
Browse latest View live

Answer by rustyx for Does memory_order_seq_cst store guarantee that...

A relaxed load does not synchronize with any other load/store before or after it.Note also that memory order semantics are about the visibility of other work done in relation to the syncronization...

View Article


Does memory_order_seq_cst store guarantee that memory_order_relaxed load will...

Is in the following code x_value guaranteed to be 42?std::atomic<int> x;Thread A: x.store(42, std::memory_order_seq_cst); wakeThreadB();Thread B: int x_value = x.load(std::memory_order_relaxed);...

View Article

Browsing all 2 articles
Browse latest View live


Latest Images