MayaFlux 0.4.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 633 of file NodeGraphManager.cpp.

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