vendredi 23 janvier 2015

How do changes (read/writes) to std::atomic variables propagate across threads

I have asked this question recently do-i-need-to-use-memory-barriers-to-protect-a-shared-resource


To that question I got a very interesting answer that uses this hypothesis:



Changes to std::atomic variables are guaranteed to propagate across threads.


Why is this so? How is it done? How does this behavior fit within the MESI protocol ?


Aucun commentaire:

Enregistrer un commentaire