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

◆ preprocess()

bool MayaFlux::Nodes::RootNode::preprocess ( )

Checks if the root node can process pending operations.

Returns
True if successful

This method can be used to determine if the root node is in the middle of a processing cycle. If true, queued pending operations will be executed

Definition at line 96 of file RootNode.cpp.

97{
99 return true;
100
101 bool expected = false;
102 if (m_request_terminate.load(std::memory_order_acquire)) {
103 return false;
104 }
105
106 if (!m_is_processing.compare_exchange_strong(expected, true,
107 std::memory_order_acquire, std::memory_order_relaxed)) {
108 return false;
109 }
110
111 if (m_pending_count.load(std::memory_order_relaxed) > 0) {
113 }
114
115 return true;
116}
void process_pending_operations()
Processes any pending node registration/unregistration operations.
Definition RootNode.cpp:198
std::atomic< bool > m_is_processing
Flag indicating if the root node is currently processing nodes.
Definition RootNode.hpp:170
bool m_skip_state_management
Flag indicating whether to skip preprocessing and post processing.
Definition RootNode.hpp:237
std::atomic< uint32_t > m_pending_count
Counter tracking the number of pending operations.
Definition RootNode.hpp:207
std::atomic< bool > m_request_terminate
Flag to request termination of processing.
Definition RootNode.hpp:178

References m_is_processing, m_pending_count, m_request_terminate, m_skip_state_management, and process_pending_operations().

Referenced by process_frame(), and process_sample().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: