std :: atomic中的任何内容都无需等待吗?

If T is a C++ fundamental type, and if std::atomic<T>::is_lock_free() returns true, then is there anything in std::atomic<T> that is wait-free (not just lock-free)? Like, load, store, fetch_add, fetch_sub, compare_exchange_weak, and compare_exchange_strong.

您还可以根据C ++标准中指定的内容以及在Clang和/或GCC(您选择的版本)中实现的内容进行回答。

评论