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

◆ stop_subsystems()

void MayaFlux::Core::Engine::stop_subsystems ( )
private

Stops subsystems while servicing required main thread work on macOS.

Definition at line 321 of file Engine.cpp.

322{
323 if (!m_subsystem_manager) {
324 return;
325 }
326
327#ifdef MAYAFLUX_PLATFORM_MACOS
328 if (CFRunLoopGetCurrent() == CFRunLoopGetMain()) {
329 auto stopped = std::async(std::launch::async, [this]() {
330 m_subsystem_manager->stop();
331 });
332 while (stopped.wait_for(std::chrono::milliseconds(0)) != std::future_status::ready) {
333 CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0.01, false);
334 }
335 stopped.get();
336 return;
337 }
338#endif
339
340 m_subsystem_manager->stop();
341}
std::shared_ptr< SubsystemManager > m_subsystem_manager
Definition Engine.hpp:402

References m_subsystem_manager.

Referenced by End().

+ Here is the caller graph for this function: