Quantcast
Channel: Do we have the guarantee that any atomic write will store the new value of the atomic variable in the main memory immediately? - Stack Overflow
Browsing all 3 articles
Browse latest View live

Answer by Ð.. for Do we have the guarantee that any atomic write will store...

Since all of the load and store instructions are atomic they each a single machine instruction so the two threads never "interrupt each other" in the "middle" of a load or store instruction.The title...

View Article



Answer by alexrider for Do we have the guarantee that any atomic write will...

I mean, does x.store(true, std::memory_order_relaxed) guarantees, that the of that particular atomic variable will be directly into the memory, without any latency? No it doesn't and in fact given...

View Article

Do we have the guarantee that any atomic write will store the new value of...

So, I was reading a lot about instruction and memory reordering and how we can prevent it, but i still have no answer to one qustion (probably because I'm not attentive enough). My question is: Do we...

View Article
Browsing all 3 articles
Browse latest View live




Latest Images