Classes | |
interface | Task |
A task that can be added for execution by Task Dispatcher. More... | |
Public Member Functions | |
boolean | isEmpty () |
Indicates whether the task dispatcher does not contain pending tasks. More... | |
boolean | isQuitting () |
Indicates whether the task dispatcher is quitting. More... | |
void | submit (Task task) |
Submits a task. More... | |
Task dispatcher.
Use TaskDispatcher to schedule execution of callbacks to the Kanzi UI thread. You can access a Kanzi UI object only on the same thread where you create object. You can wrap code that accesses UI objects with tasks and submit them to the TaskDispatcher from any thread. The UI thread executes these tasks during its main loop.
boolean isEmpty | ( | ) |
Indicates whether the task dispatcher does not contain pending tasks.
boolean isQuitting | ( | ) |
Indicates whether the task dispatcher is quitting.
This flag is set before the emptying of the task queue begins.
void submit | ( | Task | task | ) |
Submits a task.
When you call the submit function, you dispatch a task that Kanzi executes on the same UI thread to which this task dispatcher belongs. You can call this function from any thread.
task | The task that you want to submit. |