c++, std::atomic, what is std::memory_order and how to use them?
问题 Can anyone explain what is std::memory_order in plain English, and how to use them with std::atomic<> ? I found the reference and few examples here, but don't understand at all. http://en.cppreference.com/w/cpp/atomic/memory_order 回答1: Can anyone explain what is std::memory_order in plain English, The best "Plain English" explanation I've found for the various memory orderings is Bartoz Milewski's article on relaxed atomics: http://bartoszmilewski.com/2008/12/01/c-atomics-and-memory-ordering/