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

◆ process_pending_buffer_operations()

template<typename BufferType >
void MayaFlux::Buffers::RootBuffer< BufferType >::process_pending_buffer_operations ( )
inlineprotected

Process pending operations - call this at start of processing cycles.

Definition at line 251 of file RootBuffer.hpp.

252 {
253 for (auto& m_pending_op : m_pending_ops) {
254 if (m_pending_op.active.load(std::memory_order_acquire)) {
255 auto& op = m_pending_op;
256
257 if (op.is_addition) {
258 add_child_buffer_direct(op.buffer);
259 } else {
261 }
262
263 // Clear operation
264 op.buffer.reset();
265 op.active.store(false, std::memory_order_release);
266 m_pending_count.fetch_sub(1, std::memory_order_relaxed);
267 }
268 }
269 }
void add_child_buffer_direct(const std::shared_ptr< BufferType > &buffer)
void remove_child_buffer_direct(const std::shared_ptr< BufferType > &buffer)
struct MayaFlux::Buffers::RootBuffer::PendingBufferOp m_pending_ops[MAX_PENDING]
std::atomic< uint32_t > m_pending_count