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

◆ await_shutdown()

void MayaFlux::Core::Engine::await_shutdown ( )

Blocks until shutdown is requested (main thread event loop)

Pumps platform-specific events on the main thread and waits for shutdown. On macOS: Runs CFRunLoop to process dispatch queue (required for GLFW) On other platforms: Simple blocking wait for user input

Should be called on the main thread after Start().

Definition at line 169 of file Engine.cpp.

170{
171#ifdef MAYAFLUX_PLATFORM_MACOS
172 run_macos_event_loop();
173#else
174 // Simple blocking wait on other platforms
175 std::cin.get();
176#endif
177
178 m_should_shutdown.store(true, std::memory_order_release);
179
181 "Shutdown requested, awaiting all subsystem termination ......");
182}
#define MF_PRINT(comp, ctx,...)
std::atomic< bool > m_should_shutdown
Definition Engine.hpp:332
@ Runtime
General runtime operations (default fallback)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, m_should_shutdown, MF_PRINT, and MayaFlux::Journal::Runtime.

Referenced by MayaFlux::Await().

+ Here is the caller graph for this function: