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

◆ request_shutdown()

void MayaFlux::Core::Engine::request_shutdown ( )

Request shutdown from any thread.

Signals the event loop to exit. Thread-safe. Call this to gracefully terminate await_shutdown().

Definition at line 211 of file Engine.cpp.

212{
213 m_should_shutdown.store(true, std::memory_order_release);
214
215#ifdef MAYAFLUX_PLATFORM_MACOS
216 CFRunLoopStop(CFRunLoopGetMain());
217#elif defined(MAYAFLUX_PLATFORM_WINDOWS)
218 PostThreadMessage(Parallel::g_MainThreadId, WM_QUIT, 0, 0);
219#endif
220}
std::atomic< bool > m_should_shutdown
Definition Engine.hpp:374

References m_should_shutdown.