Memory Model
This lesson provides a simple set of rules for efficiently using C++ memory models.
The foundation of multithreading is a well-defined memory model. Having a basic understanding of the memory helps a lot to get a deeper insight into the multithreading challenges.
Don’t use Volatile for Synchronization
In C++, in contrast to C# or Java, volatile
has no multithreading semantic . In C# or Java, volatile
declares an atomic such as std::atomic
declares an atomic in C++, and ...