KeepAlive application loop helper.
More...
#include <keep_alive.h>
KeepAlive application loop helper.
◆ func_awake_thread()
static Callback_v1<void *>& clan::KeepAlive::func_awake_thread |
( |
| ) |
|
|
static |
Function that gets called when KeepAliveObject::set_wakeup_event is called.
This callback is used to provide a way to awaken a thread that needs to process keep alive events.
◆ func_event_wait()
static Callback_2<int , const std::vector<Event> &, int >& clan::KeepAlive::func_event_wait |
( |
| ) |
|
|
static |
Function that polls the events.
If this is not set, Event::wait() is used.
- Parameters
-
events | = The event objects to wait for |
timeout | = Timeout (ms). -1 = Wait forever |
- Returns
- The event that triggered an event.
-1 = Timeout events.size() = An external event was triggered
◆ func_thread_id()
static Callback_0<void *>& clan::KeepAlive::func_thread_id |
( |
| ) |
|
|
static |
Function that gets called when KeepAliveObject objects are created.
This callback is used to provide a thread identifier for the func_awake_thread callback.
◆ get_objects()
Returns all the current keep alive objects available for this thread.
◆ process()
static void clan::KeepAlive::process |
( |
int |
timeout = 0 | ) |
|
|
static |
Processes and dispatches keep alive events until the specified timeout period has passed.
- Parameters
-
timeout | = Timeout (ms). -1 = Wait forever |
The documentation for this class was generated from the following file: