MayaFlux 0.4.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 198 of file Engine.cpp.

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