Atomic publication of a Shared. More...
#include <StormByte/safe/pointers.hxx>
Public Member Functions | |
| AtomicShared () noexcept | |
| Construct an empty atomic owner. | |
| AtomicShared (Shared< T > owner) noexcept | |
| Construct from an owner. | |
| AtomicShared (const AtomicShared &other)=delete | |
| Copy constructor. | |
| ~AtomicShared () | |
| Destroy the published owner. | |
| AtomicShared & | operator= (const AtomicShared &other)=delete |
| Copy assignment. | |
| AtomicShared & | operator= (Shared< T > owner) noexcept |
| Publish an owner. | |
| operator bool () const noexcept | |
| Test whether an owner is published. | |
| Shared< T > | load () const noexcept |
| Copy the published owner. | |
| void | store (Shared< T > owner) noexcept |
| Replace the published owner. | |
| Shared< T > | exchange (Shared< T > owner) noexcept |
| Replace the published owner and return the previous one. | |
| bool | compare_exchange_strong (Shared< T > &expected, Shared< T > desired) noexcept |
| Replace the published owner when it compares equal by address. | |
| bool | compare_exchange_weak (Shared< T > &expected, Shared< T > desired) noexcept |
| Replace the published owner when it compares equal by address. | |
Atomic publication of a Shared.
| T | Pointee type. |
Load, store, exchange and compare-exchange adjust the same Base control block. The lock lives in this object, so two modules can publish a Shared without a libc++ control block.
|
noexcept |
Construct an empty atomic owner.
|
explicitnoexcept |
Construct from an owner.
| owner | Owner to publish. |
|
delete |
Copy constructor.
Deleted.
| other | Ignored. |
| StormByte::Safe::AtomicShared< T >::~AtomicShared | ( | ) |
Destroy the published owner.
|
noexcept |
|
noexcept |
|
noexcept |
Replace the published owner and return the previous one.
| owner | Owner to publish. |
|
noexcept |
Copy the published owner.
|
explicitnoexcept |
Test whether an owner is published.
|
delete |
Copy assignment.
Deleted.
| other | Ignored. |
|
noexcept |
|
noexcept |
Replace the published owner.
| owner | Owner to publish. |