CL_KeepAlive application loop helper. More...
#include <keep_alive.h>
Static Public Member Functions | |
| static CL_Callback_v1< void * > & | func_awake_thread () |
| Function that gets called when CL_KeepAliveObject::set_wakeup_event is called. | |
| static CL_Callback_2< int, const std::vector< CL_Event > &, int > & | func_event_wait () |
| Function that polls the events. | |
| static CL_Callback_0< void * > & | func_thread_id () |
| Function that gets called when CL_KeepAliveObject objects are created. | |
| static std::vector < CL_KeepAliveObject * > | get_objects () |
| Returns all the current keep alive objects available for this thread. | |
| static void | process (int timeout=0) |
| Processes and dispatches keep alive events until the specified timeout period has passed. | |
CL_KeepAlive application loop helper.
| static CL_Callback_v1<void *>& CL_KeepAlive::func_awake_thread | ( | ) | [static] |
Function that gets called when CL_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.
| static CL_Callback_2<int , const std::vector<CL_Event> &, int >& CL_KeepAlive::func_event_wait | ( | ) | [static] |
Function that polls the events.
If this is not set, CL_Event::wait() is used.
| events | = The event objects to wait for | |
| timeout | = Timeout (ms). -1 = Wait forever |
| static CL_Callback_0<void *>& CL_KeepAlive::func_thread_id | ( | ) | [static] |
Function that gets called when CL_KeepAliveObject objects are created.
This callback is used to provide a thread identifier for the func_awake_thread callback.
| static std::vector<CL_KeepAliveObject *> CL_KeepAlive::get_objects | ( | ) | [static] |
Returns all the current keep alive objects available for this thread.
| static void CL_KeepAlive::process | ( | int | timeout = 0 |
) | [static] |
Processes and dispatches keep alive events until the specified timeout period has passed.
| timeout | = Timeout (ms). -1 = Wait forever |
1.7.1