I've read this and this answer. I've also searched the book C++ Concurrency in Action and found no discussion about volatile nor any example using it. Looks like it's not designed for concurrency at all. So for concurrent programming, is it sufficient to just use atomic, mutex, etc., and forget about volatile? Any cases where volatile may be needed for concurrency issues?
Aucun commentaire:
Enregistrer un commentaire