| 1142 | explicit AtomicSharedPtr(std::shared_ptr<T> ptr) : ptr_(std::move(ptr)) {} |
| 1143 | |
| 1144 | std::shared_ptr<T> load(std::memory_order = std::memory_order_seq_cst) const { |
| 1145 | std::lock_guard<std::mutex> lock(mutex_); |
| 1146 | return ptr_; |
| 1147 | } |
| 1148 | void store(std::shared_ptr<T> ptr, std::memory_order = std::memory_order_seq_cst) { |
| 1149 | std::lock_guard<std::mutex> lock(mutex_); |
| 1150 | ptr_ = std::move(ptr); |
no outgoing calls