Main thread message pump processing. More...
#include <run_loop.h>
Static Public Member Functions | |
static void | exit () |
Signal that message processing should end immediately. More... | |
static void | main_thread_async (std::function< void()> func) |
Executes a function on the main thread during message processing. More... | |
template<typename T > | |
static std::future< T > | main_thread_task (std::function< T()> func) |
Executes a task on the main thread with a future result. More... | |
static std::future< void > | main_thread_task (std::function< void()> func) |
static bool | process (int timeout_ms=0) |
Process messages for specified amount of time. More... | |
static void | run () |
Continously process messages until RunLoop::exit() is called. More... | |
Main thread message pump processing.
|
static |
Signal that message processing should end immediately.
|
static |
Executes a function on the main thread during message processing.
This provides a thread-safe way to execute some code on the main thread as part of the message processing step.
Referenced by main_thread_task().
|
inlinestatic |
Executes a task on the main thread with a future result.
This provides a thread-safe way to execute some code on the main thread as part of the message processing step. The caller can then wait and access the result of the operation through the returned future.
References main_thread_async().
|
inlinestatic |
References main_thread_async().
|
static |
Process messages for specified amount of time.
Returns | false if RunLoop::exit() has been called or the OS signalled the app needs to shut down |
|
static |
Continously process messages until RunLoop::exit() is called.