1#ifndef LINTEL_PROPERTYVALUESTORAGE_H
2#define LINTEL_PROPERTYVALUESTORAGE_H
20 : std::bool_constant<std::atomic<T>::is_always_lock_free>
35 mutable std::shared_mutex m_mutex;
46 std::shared_lock<std::shared_mutex>
lock(m_mutex);
53 std::lock_guard<std::shared_mutex>
lock(m_mutex);
65 std::atomic<T> m_value;
73 T load()
const {
return m_value.load(std::memory_order_relaxed); }
76 void store(
const T &value) { m_value.store(value, std::memory_order_relaxed); }
PropertyValueStorage()
Definition PropertyValueStorage.h:68
T load() const
Definition PropertyValueStorage.h:73
static constexpr bool isLockFree()
Definition PropertyValueStorage.h:79
void store(const T &value)
Definition PropertyValueStorage.h:76
PropertyValueStorage(const T &value)
Definition PropertyValueStorage.h:70
Definition PropertyValueStorage.h:33
PropertyValueStorage(const T &value)
Definition PropertyValueStorage.h:41
static constexpr bool isLockFree()
Definition PropertyValueStorage.h:58
T load() const
Definition PropertyValueStorage.h:44
void store(const T &value)
Definition PropertyValueStorage.h:51
PropertyValueStorage()
Definition PropertyValueStorage.h:39
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9
Definition PropertyValueStorage.h:15