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

◆ queue_pending_processor_op()

bool MayaFlux::Buffers::BufferProcessingChain::queue_pending_processor_op ( const std::shared_ptr< BufferProcessor > &  processor,
const std::shared_ptr< Buffer > &  buffer,
bool  is_addition,
bool  search_all_slots = false,
std::string *  rejection_reason = nullptr 
)
private

Definition at line 448 of file BufferProcessingChain.cpp.

454{
455 for (auto& m_pending_op : m_pending_ops) {
456 bool expected = false;
457 if (m_pending_op.active.compare_exchange_strong(
458 expected, true,
459 std::memory_order_acquire,
460 std::memory_order_relaxed)) {
461
462 m_pending_op.processor = processor;
463 m_pending_op.buffer = buffer;
464 m_pending_op.is_addition = is_addition;
465 m_pending_op.search_all_slots = search_all_slots;
466 m_pending_count.fetch_add(1, std::memory_order_relaxed);
467 return true;
468 }
469 }
470
471 if (rejection_reason && is_addition) {
472 *rejection_reason = "Processor operation queue full";
473 }
474 return false;
475}
std::shared_ptr< NetworkGeometryBuffer > buffer
PendingProcessorOp m_pending_ops[MAX_PENDING_PROCESSORS]

References buffer, m_pending_count, and m_pending_ops.

Referenced by add_processor(), and remove_processor_internal().

+ Here is the caller graph for this function: