MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ read_retry()

bool MayaFlux::Memory::Seqlock::read_retry ( uint32_t  snapshot) const
inlinenoexcept

Check whether a write overlapped the read just completed.

Parameters
snapshotValue returned by the matching read_begin() call.
Returns
true if the caller must retry the read, false if data is valid.

Definition at line 116 of file SeqLock.hpp.

117 {
118 std::atomic_thread_fence(std::memory_order_acquire);
119 return m_seq.load(std::memory_order_relaxed) != snapshot;
120 }
std::atomic< uint32_t > m_seq
Definition SeqLock.hpp:134

References m_seq.

Referenced by MayaFlux::Memory::seqlock_read_void().

+ Here is the caller graph for this function: