Fences as Memory Barriers
This lesson introduces a concept of fences as memory barriers in C++.
We'll cover the following...
An std::atomic_thread_fence
prevents specific operations from crossing a fence, and it doesn’t need an atomic variable; they are frequently just referred to as fences or memory barriers. You quickly get an idea of what an std::atomic_thread_fence
is all about.
What does it mean by Fences as Memory Barriers? Specific operations cannot cross a memory barrier. What kind of operations? From a bird’s-eye view, we have two ...