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.
文章解释了std::memory_order_acquire在存储操作中的效果等同于std::memory_order_relaxed,因为前者只影响加载,而存储操作不涉及。反之,std::memory_order_release在加载操作时等同于std::memory_order_relaxed,因它只控制存储。作者对某些开发者不能理解这个简单的规则表示疑惑。
10

被折叠的 条评论
为什么被折叠?



