Message loop for servicing idle tasks. More...
#include <UTIdleTask.h>
Public Member Functions | |
IdleMessageLoop_t () | |
~IdleMessageLoop_t () | |
void | AddIdleTask (IdleTask_t *task) |
void | RemoveIdleTask (IdleTask_t *task) |
Message loop for servicing idle tasks. A single, global idle task message loop is provided by the UT library as g_idle_message_loop.
Definition at line 104 of file UTIdleTask.h.
IdleMessageLoop_t::IdleMessageLoop_t | ( | ) |
Constructor. A single, global idle task message loop is provided by the UT library as g_idle_message_loop.
IdleMessageLoop_t::~IdleMessageLoop_t | ( | ) |
Destructor. All idle tasks must have been removed before main returns. Consequently, no global object can rely on its destructor to remove an idle task.
void IdleMessageLoop_t::AddIdleTask | ( | IdleTask_t * | task | ) |
Adds a task to be performed at idle. It must be removed from the idle message loop before main returns. Consequently, no global object can rely on its destructor to remove an idle task.
void IdleMessageLoop_t::RemoveIdleTask | ( | IdleTask_t * | task | ) |
Removes an idle task. This can be called from within the idle thread (a task removing itself) or from outside by the owner of the idle task.