![]() |
MySQL 9.2.0
Source Code Documentation
|
Representation of an atomic type which is guaranteed to be always-lock-free. More...
#include <lock_free_type.h>
Public Types | |
using | Type = typename TypeSelector< T >::Type |
Public Attributes | |
std::atomic< Type > | m_value |
Representation of an atomic type which is guaranteed to be always-lock-free.
In case always-lock-free property cannot be satisfied for given T, Lock_free_type instantiation will fail with the compile-time error.
Always-lock-free guarantee is implemented through the means of Lock_free_type_selector or Largest_lock_free_type_selector. User code can opt-in for any of those. By default, Lock_free_type_selector is used.
In addition, this type provides an ability to redefine the alignment-requirement of the underlying always-lock-free type, basically making it possible to over-align T to the size of the L1-data cache-line size. By default, T has a natural alignment.
using temptable::Lock_free_type< T, ALIGN, TypeSelector >::Type = typename TypeSelector<T>::Type |
std::atomic<Type> temptable::Lock_free_type< T, ALIGN, TypeSelector >::m_value |