I am reading that the volatile
keyword is not suitable for thread synchronisation and in fact it is not needed for these purposes at all.
While I unders
Shortening the answer already given, you do not need to use volatile
with mutexes for a simple reason:
std::mutex
), it well knows how to handle access in regards to optimization (which is even required for std::mutex
)