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

◆ Await()

MAYAFLUX_API void MayaFlux::Await ( )

Blocks launcher until Ctrl-C is pressed (optional convenience function)

Use this only in launcher applications that need to block the main thread until shutdown is requested.

Gates on SIGINT (Ctrl-C) alone, on every platform. Never reads or consumes stdin, so stdin-driven backends (unix pipe, fileio) remain free to use it while this call blocks.

Usage (optional):

engine->start_graphics();
std::cout << "Press Ctrl-C to stop...\n";
MayaFlux::Await(); // Blocks here (optional)
engine->stop_graphics();
void Await()
Blocks launcher until Ctrl-C is pressed (optional convenience function)
Definition Core.cpp:149

Definition at line 149 of file Core.cpp.

150{
151 if (internal::initialized.load(std::memory_order_acquire)) {
153 }
154}
void await_shutdown()
Blocks until shutdown is requested (main thread event loop)
Definition Engine.cpp:204
Core::Engine & get_context()
Gets the default engine instance.
Definition Core.cpp:101

References MayaFlux::Core::Engine::await_shutdown(), get_context(), and MayaFlux::internal::initialized.

Referenced by main().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: