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

◆ stop()

void MayaFlux::Core::NetworkSubsystem::stop ( )
overridevirtual

Stop the subsystem's processing/event loops.

Implements MayaFlux::Core::ISubsystem.

Definition at line 118 of file NetworkSubsystem.cpp.

119{
120 if (!m_running.load()) {
121 return;
122 }
123
124 m_running.store(false);
125
126 {
127 std::shared_lock lock(m_backends_mutex);
128 for (auto& [transport, backend] : m_backends) {
129 backend->stop();
130 }
131 }
132
135 }
136
137 m_work_guard.reset();
138 m_io_context->stop();
139
140 if (m_io_thread.joinable()) {
141 m_io_thread.request_stop();
142 m_io_thread.join();
143 }
144
145 m_io_context->restart();
146
148 "Network Subsystem stopped");
149}
#define MF_INFO(comp, ctx,...)
std::unique_ptr< asio::io_context > m_io_context
std::unique_ptr< asio::executor_work_guard< asio::io_context::executor_type > > m_work_guard
std::unordered_map< NetworkTransport, std::unique_ptr< INetworkBackend > > m_backends
@ Shutdown
Engine/subsystem shutdown and cleanup.
@ Core
Core engine, backend, subsystems.
void stop()
Stop active Portal::Network operations.
Definition Network.cpp:36
bool is_initialized()
Return true if Portal::Network has been initialized.
Definition Network.cpp:66

References MayaFlux::Journal::Core, MayaFlux::Portal::Network::is_initialized(), MF_INFO, MayaFlux::Journal::Shutdown, and MayaFlux::Portal::Network::stop().

+ Here is the call graph for this function: