MayaFlux 0.5.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 97 of file SeqLock.hpp.

98 {
99 std::atomic_thread_fence(std::memory_order_acquire);
100 return m_seq.load(std::memory_order_relaxed) != snapshot;
101 }
std::atomic< uint32_t > m_seq
Definition SeqLock.hpp:115

References m_seq.

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

+ Here is the caller graph for this function: