MayaFlux 0.3.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 631 of file NodeGraphManager.cpp.

632{
633 if (m_terminate_requested.load())
634 return;
635
636 for (auto& [token, networks] : m_audio_networks) {
637 for (auto& network : networks) {
638 if (network) {
640 }
641 }
642 }
643
644 for (auto& [token, networks] : m_token_networks) {
645 for (auto& network : networks) {
646 if (network) {
648 }
649 }
650 }
651
652 m_terminate_requested.store(true);
653
654 for (auto token : get_active_tokens()) {
655 auto roots = get_all_root_nodes(token);
656 for (auto* root : roots) {
657 root->terminate_all_nodes();
658 }
659 }
660}
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, and unregister_network_global().

Referenced by ~NodeGraphManager().

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