std::atomic<T>::load (since C++11) Tload(std::memory_order order=std::memory_order_seq_cst)constnoexcept; Tload(std::memory_order order=std::memory_order_seq_cst)constvolatilenoexcept; Atomically loads and retu
std::atomic_int a;A线程: a.store(1);B线程: a.load();假设A线程已经执行完成, 请问此时B线程...
atomically replaces the value of the atomic object with a non-atomic argument (function template) memory_order (C++11) defines memory ordering constraints for the given atomic operation (typedef) std::atomic_load(std::shared_ptr) std::atomic_load_explicit(std::shared_ptr) ...
T atomic_load_explicit(constvolatilestd::atomic<T>*obj, std::memory_orderorder)noexcept; (4)(C++11 起) 1,2)如同用obj->load()原子地獲得obj指向的值。 3,4)如同用obj->load(order)原子地獲得obj所指向的值。 如果order是std::memory_order_release和std::memory_order_acq_rel之一,那麼行為未定...
std::atomic_load,std::atomic_load_explicit C++ Concurrency support library Defined in header<atomic> template<classT> T atomic_load(conststd::atomic<T>*obj)noexcept; (1)(since C++11) template<classT> T atomic_load(constvolatilestd::atomic<T>*obj)noexcept; ...
std::atomic::fetch_sub std::atomic::fetch_xor std::atomic::is_always_lock_free std::atomic::is_lock_free std::atomic::load std::atomic::operator T() std::atomic::operators std::atomic::operators (int) std::atomic::store std::atomic_compare_exchange_strong ...
std::atomic<T>::fetch_sub std::atomic<T>::fetch_and std::atomic<T>::fetch_or std::atomic<T>::fetch_xor std::atomic<T>::operator++,++(int),--,--(int) std::atomic<T>::operator+=,-=,&=,|=,^= std::atomic_store, std::atomic_store_explicit std::atomic_load, std::atomic...
std::atomic T load(std::memory_orderorder =std::memory_order_seq_cst)constnoexcept; (1)(since C++11) T load(std::memory_orderorder =std::memory_order_seq_cst)constvolatilenoexcept; (2)(since C++11) Atomically loads and returns the current value of the atomic variable. Memory is affecte...
std::atomic_load, std::atomic_load_explicit std::atomic_exchange, std::atomic_exchange_explicit std::atomic std::atomic_flag std::atomic_ref std::atomic_compare_exchange_weak, std::atomic_compare_exchange_strong, std::atomic_compare_exchange_weak_explicit, std::atomic_compare_exchange_strong_...
T load( std::memory_order order = std::memory_order_seq_cst ) const noexcept; (C++20 起) 原子地加载并返回被引用对象的当前值。按照 order 的值影响内存。 order 必须是 std::memory_order_relaxed、 std::memory_order_consume、 std::memory_order_acquire 或std::memory_order_seq_cst 之一。否则...