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

◆ process_non_owning()

void MayaFlux::Buffers::BufferProcessor::process_non_owning ( std::shared_ptr< Buffer buffer)
private

Internal processing method for non-owning buffer contexts.

Parameters
bufferBuffer to process

This method is used internally by BufferProcessingChain to process buffers that are not owned by the chain itself. It ensures that the processor's processing function is called in a thread-safe manner, managing the active processing state to prevent concurrent access issues.

Definition at line 27 of file BufferProcessor.cpp.

28{
29 m_active_processing.fetch_add(1, std::memory_order_acquire);
30
31 try {
32 processing_function(buffer);
33 } catch (...) {
34 m_active_processing.fetch_sub(1, std::memory_order_release);
35 throw;
36 }
37
38 m_active_processing.fetch_sub(1, std::memory_order_release);
39}
std::atomic< size_t > m_active_processing
virtual void processing_function(std::shared_ptr< Buffer > buffer)=0
The core processing function that must be implemented by derived classes.

References m_active_processing, and processing_function().

+ Here is the call graph for this function: