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

◆ remove_child_buffer()

template<typename BufferType >
virtual void MayaFlux::Buffers::RootBuffer< BufferType >::remove_child_buffer ( std::shared_ptr< BufferType >  buffer)
inlinevirtual

Removes a tributary buffer from this root buffer.

Parameters
bufferChild buffer to remove from the aggregation hierarchy

Definition at line 63 of file RootBuffer.hpp.

64 {
65 if (this->is_processing()) {
66 for (auto& m_pending_op : m_pending_ops) {
67 bool expected = false;
68 if (m_pending_op.active.compare_exchange_strong(expected, true, std::memory_order_acquire, std::memory_order_relaxed)) {
69 m_pending_op.buffer = buffer;
70 m_pending_op.is_addition = false;
71 m_pending_count.fetch_add(1, std::memory_order_relaxed);
72 return;
73 }
74 }
75
76 return;
77 }
78
80 }
void remove_child_buffer_direct(std::shared_ptr< BufferType > buffer)
struct MayaFlux::Buffers::RootBuffer::PendingBufferOp m_pending_ops[MAX_PENDING]
std::atomic< uint32_t > m_pending_count