Atomic wrapper around std::shared_ptr providing lock-free style operations.
Declared in <folly/concurrency/AtomicSharedPtr.h>
template<typename T>
class atomic_shared_ptr;
This fallback implementation forwards to the standard library's free function atomic operations on shared_ptr.
| Name | Description |
|---|---|
value_type | The underlying shared_ptr type stored by this wrapper. |
| Name | Description |
|---|---|
atomic_shared_ptr [constructor] | Constructors |
operator= | Assignment operators |
compare_exchange_strong | Atomically compares and, on success, stores a new value without spurious failures. |
compare_exchange_weak | Atomically compares and, on success, stores a new value, possibly failing spuriously. |
exchange | Atomically replaces the stored value and returns the previous one. |
is_lock_free | Reports whether operations on this object are lock-free. |
load | Atomically loads the stored shared_ptr. |
store | Atomically stores a new shared_ptr value. |
operator std::shared_ptr<T> | Atomically loads the stored shared_ptr. |
| Name | Description |
|---|---|
atomic_shared_ptr<T> | Deduction guide for constructing atomic_shared_ptr from a shared_ptr. |