AI Features

The Three Fences

This lesson gives an overview of the acquire, release, and full fences used in C++ as memory barriers.

We'll cover the following...

Typically, three kinds of fences are used: full fence, acquire fence and release fence. As a reminder, acquire is a load, and release is a store operation. What happens if I place one of the three memory barriers between the four combinations of load and store operations?

  • Full fence: A full fence ...