remember this :
std::memory_order_acquire
with a store operation is equivalent to std::memory_order_relaxed
std::memory_order_release
with a load operation is equivalent to std::memory_order_relaxed
In practice, using std::memory_order_acquire
with a store operation is equivalent to std::memory_order_relaxed
because std::memory_order_acquire
only orders loads but a store operation doesn’t load anything. Similarly, using std::memory_order_release
with a load operation is equivalent to std::memory_order_relaxed
because std::memory_order_release
only orders stores but a load operation doesn’t store anything.
not know why so many or almost all motherfxcker "big tech guy" can not say the very simple rule.