Task dispatcher. More...
#include <kanzi/core.ui/platform/task_dispatcher/common/task_dispatcher.hpp>
Public Member Functions | |
TaskDispatcher () | |
Constructor. More... | |
NativeEventHandle | getNativeEventHandle () |
Returns the native handle that can be used to wait for available tasks. More... | |
virtual void | notifyTasksAvailable () KZ_OVERRIDE |
TaskDispatcherBase::notifyTasksAvailable() implementation. More... | |
virtual void | notifyTasksConsumed () KZ_OVERRIDE |
TaskDispatcherBase::notifyTasksConsumed() implementation. More... | |
Public Member Functions inherited from kanzi::TaskDispatcherBase | |
void | submit (Task task) |
Submits a task. More... | |
size_t | executeTasks () |
Executes the tasks that have been dispatched to the UI thread. More... | |
void | cleanupTasks () |
Clean up tasks until no tasks remain. More... | |
void | setProfilerRegistry (MainLoopTaskProfilerRegistry &profiler) |
Setter for profiler registry. More... | |
bool | isQuitting () const |
Indicates whether the task dispatcher is quitting. More... | |
void | setQuitting (bool flag) |
Set the quitting flag state. More... | |
Additional Inherited Members | |
Public Types inherited from kanzi::TaskDispatcherBase | |
typedef function< void()> | Task |
Task is a callback that is dispatched by TaskDispatcher and executed on a specific UI thread. More... | |
Protected Member Functions inherited from kanzi::TaskDispatcherBase | |
TaskDispatcherBase () | |
Constructor. More... | |
virtual | ~TaskDispatcherBase () |
Destructor. More... | |
Task dispatcher.
You can use TaskDispatcher to schedule execution of callbacks to the UI thread. You can access Kanzi UI objects only on the thread that you create them on. You can wrap code that accesses UI objects with tasks and submit them from any thread to the TaskDispatcher. The UI thread will execute these tasks during its main loop.
|
inlineexplicit |
Constructor.
NativeEventHandle kanzi::TaskDispatcher::getNativeEventHandle | ( | ) |
Returns the native handle that can be used to wait for available tasks.
This is an internal function.
|
virtual |
TaskDispatcherBase::notifyTasksAvailable() implementation.
Implements kanzi::TaskDispatcherBase.
|
virtual |
TaskDispatcherBase::notifyTasksConsumed() implementation.
Implements kanzi::TaskDispatcherBase.