MayaFlux 0.3.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 194 of file Engine.cpp.

195{
196#ifdef MAYAFLUX_PLATFORM_MACOS
197 run_macos_event_loop();
198#elif defined(MAYAFLUX_PLATFORM_WINDOWS)
199 run_windows_event_loop();
200#else
201 // Simple blocking wait on other platforms
202 std::cin.get();
203#endif
204
205 m_should_shutdown.store(true, std::memory_order_release);
206
208 "Shutdown requested, awaiting all subsystem termination ......");
209}
#define MF_PRINT(comp, ctx,...)
std::atomic< bool > m_should_shutdown
Definition Engine.hpp:374
@ 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: