C++ memory model
The classic C++ was essentially a single threaded language. Even though people were writing multithread programs in C++, they were using respective platform threading facilities to write them. Modern C++ can be considered a concurrent programming language. The language standard provides a standard thread and task mechanism (as we have already seen) with the help of standard libraries. Since it is a part of the standard library, the language specification has defined how things should behave across the platform in a precise manner. Having a consistent platform-agnostic behavior for threads, tasks, and so on is a massive challenge that the standard committee handled really well. The committee designed and specified a standard ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access