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

◆ terminate_active_processing()

void MayaFlux::Nodes::NodeGraphManager::terminate_active_processing ( )

Terminates all active processing across all tokens and channels.

This method stops all active processing contexts in all root nodes and networks, ensuring a clean shutdown of processing activities.

Definition at line 606 of file NodeGraphManager.cpp.

607{
608 if (m_terminate_requested.load())
609 return;
610
611 for (auto& [token, networks] : m_audio_networks) {
612 for (auto& network : networks) {
613 if (network) {
615 }
616 }
617 }
618
619 for (auto& [token, networks] : m_token_networks) {
620 for (auto& network : networks) {
621 if (network) {
623 }
624 }
625 }
626
627 m_terminate_requested.store(true);
628
629 for (auto token : get_active_tokens()) {
630 auto roots = get_all_root_nodes(token);
631 for (auto* root : roots) {
632 root->terminate_all_nodes();
633 }
634 }
635}
static MayaFlux::Nodes::ProcessingToken token
Definition Timers.cpp:8
std::unordered_map< ProcessingToken, std::vector< std::shared_ptr< Network::NodeNetwork > > > m_token_networks
Non-audio networks (token-level processing) For NONE, GRAPHICS_BIND, CUSTOM output modes.
std::atomic< bool > m_terminate_requested
Global termination flag.
std::unordered_map< ProcessingToken, std::vector< std::shared_ptr< Network::NodeNetwork > > > m_audio_networks
Audio-sink networks Only populated for networks with OutputMode::AUDIO_SINK.
void unregister_network_global(const std::shared_ptr< Network::NodeNetwork > &network)
Unregister network globally.
std::vector< ProcessingToken > get_active_tokens() const
Gets all currently active processing tokens (domains)
std::vector< RootNode * > get_all_root_nodes(ProcessingToken token)
Get spans of root nodes for a token (for custom processing)

References get_active_tokens(), get_all_root_nodes(), m_audio_networks, m_terminate_requested, m_token_networks, token, and unregister_network_global().

Referenced by ~NodeGraphManager().

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