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

◆ remove_processor()

void MayaFlux::Kakshya::DataProcessingChain::remove_processor ( const std::shared_ptr< DataProcessor > &  processor,
const std::shared_ptr< SignalSourceContainer > &  container 
)

Removes a processor from a container's chain.

Parameters
processorThe data processor to remove.
containerThe signal container to remove the processor from.

If called while a process variant is iterating, the removal is deferred until the current iteration completes.

Definition at line 33 of file DataProcessingChain.cpp.

36{
37 if (m_is_processing.load(std::memory_order_acquire)) {
38 m_pending_removal.emplace_back(processor, container);
39 return;
40 }
41
42 remove_processor_direct(processor, container);
43}
void remove_processor_direct(const std::shared_ptr< DataProcessor > &processor, const std::shared_ptr< SignalSourceContainer > &container)
Performs immediate removal of a processor from the chain.
std::vector< std::pair< std::shared_ptr< DataProcessor >, std::shared_ptr< SignalSourceContainer > > > m_pending_removal
Removals deferred because they arrived during active iteration.
std::atomic< bool > m_is_processing
Guards all process variants against concurrent or re-entrant iteration.

References m_is_processing, m_pending_removal, and remove_processor_direct().

+ Here is the call graph for this function: