MayaFlux 1.0.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 51 of file RootNode.cpp.

52{
54 return true;
55
56 bool expected = false;
57 if (m_request_terminate.load(std::memory_order_acquire)) {
58 return false;
59 }
60
61 if (!m_is_processing.compare_exchange_strong(expected, true,
62 std::memory_order_acquire, std::memory_order_relaxed)) {
63 return false;
64 }
65
66 if (m_pending_ops.has_pending()) {
68 }
69
70 return true;
71}
void process_pending_operations()
Processes any pending node registration/unregistration operations.
Definition RootNode.cpp:164
Memory::PendingQueue< PendingOp, 2048 > m_pending_ops
Operations queued by any thread and applied in arrival order by the processing thread.
Definition RootNode.hpp:207
std::atomic< bool > m_is_processing
Flag indicating if the root node is currently processing nodes.
Definition RootNode.hpp:177
bool m_skip_state_management
Flag indicating whether to skip preprocessing and post processing.
Definition RootNode.hpp:246
std::atomic< bool > m_request_terminate
Flag to request termination of processing.
Definition RootNode.hpp:185

References m_is_processing, m_pending_ops, 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: