function inserts a "memory barrier" or "fence" in the
code to force memory ordering constaints between operations.
Insert a fence with the required memory ordering constraints.
A fence with an
an acquire operation on the some memory location
if that acquire operation reads a value stored by an atomic operation
following the fence on the same thread as the fence.
A release operation synchronizes-with
a fence with an
std::memory_order_seq_cst if that release
operation stores a value which is read by an atomic operation prior
to the fence on the same thread as the fence.