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

◆ has_pending()

template<typename T , size_t Capacity>
bool MayaFlux::Memory::PendingQueue< T, Capacity >::has_pending ( ) const
inlinenoexcept

Cheap check for claimed operations awaiting a drain.

May report true for an operation still being published; drain() then applies nothing and the operation is picked up by the next one.

Definition at line 123 of file PendingQueue.hpp.

124 {
125 return m_enqueue.load(std::memory_order_relaxed)
126 != m_dequeue.load(std::memory_order_relaxed);
127 }
std::atomic< size_t > m_dequeue
std::atomic< size_t > m_enqueue

References MayaFlux::Memory::PendingQueue< T, Capacity >::m_dequeue, and MayaFlux::Memory::PendingQueue< T, Capacity >::m_enqueue.