9 #ifndef CPPCOMMON_THREADS_SEQLOCK_H
10 #define CPPCOMMON_THREADS_SEQLOCK_H
34 explicit SeqLock(
const T& data);
49 T
Read() const noexcept;
57 void Write(const T& data) noexcept;
60 typedef
char cache_line_pad[128];
64 std::atomic<
size_t> _seq;
72 #include "seq_lock.inl"
Sequential lock synchronization primitive.
void Write(const T &data) noexcept
Write data under the sequential lock.
SeqLock & operator=(SeqLock &&)=delete
T Read() const noexcept
Read data under the sequential lock.
SeqLock & operator=(const T &data) noexcept
SeqLock(SeqLock &&)=default
SeqLock & operator=(const SeqLock &)=delete
SeqLock(const SeqLock &)=delete
C++ Common project definitions.