A class that defines the interface to the MIP SDK task dispatcher.
More...
#include <task_dispatcher_delegate.h>
|
virtual void | DispatchTask (const std::string &taskId, std::function< void()> task)=0 |
| Execute a task on a background thread.
|
|
virtual void | DispatchTask (const std::string &taskId, std::function< void()> task, const std::shared_ptr< void > &) |
| Execute a task on a background thread.
|
|
virtual void | DispatchTask (const std::string &taskId, std::function< void()> task, int64_t delaySeconds)=0 |
| Execute a task on a background thread with the given delay.
|
|
virtual void | DispatchTask (const std::string &taskId, std::function< void()> task, int64_t delaySeconds, const std::shared_ptr< void > &) |
| Execute a task on a background thread with the given delay.
|
|
virtual void | ExecuteTaskOnIndependentThread (const std::string &taskId, std::function< void()> task)=0 |
| Immediately execute a task on an independent thread.
|
|
virtual void | ExecuteTaskOnIndependentThread (const std::string &taskId, std::function< void()> task, const std::shared_ptr< void > &) |
| Immediately execute a task on an independent thread.
|
|
virtual bool | CancelTask (const std::string &taskId)=0 |
| Cancel a background task.
|
|
virtual bool | CancelTask (const std::string &taskId, const std::shared_ptr< void > &) |
| Cancel a background task.
|
|
virtual void | CancelAllTasks ()=0 |
| Cancel all background tasks.
|
|
A class that defines the interface to the MIP SDK task dispatcher.
◆ CancelAllTasks()
virtual void TaskDispatcherDelegate::CancelAllTasks |
( |
| ) |
|
|
pure virtual |
Cancel all background tasks.
◆ CancelTask() [1/2]
virtual bool TaskDispatcherDelegate::CancelTask |
( |
const std::string & | taskId | ) |
|
|
pure virtual |
Cancel a background task.
- Parameters
-
taskId | ID of task to cancel |
- Returns
- True if task was successfully cancelled, else false
◆ CancelTask() [2/2]
virtual bool TaskDispatcherDelegate::CancelTask |
( |
const std::string & | taskId, |
|
|
const std::shared_ptr< void > & | ) |
|
inlinevirtual |
Cancel a background task.
- Parameters
-
taskId | ID of task to cancel |
loggerContext | logger context that should be used with the logger delegate for cancelation logging |
- Returns
- True if task was successfully cancelled, else false
◆ DispatchTask() [1/4]
virtual void TaskDispatcherDelegate::DispatchTask |
( |
const std::string & | taskId, |
|
|
std::function< void()> | task ) |
|
pure virtual |
Execute a task on a background thread.
- Parameters
-
taskId | ID to uniquely identify a task |
task | Function to be executed |
◆ DispatchTask() [2/4]
virtual void TaskDispatcherDelegate::DispatchTask |
( |
const std::string & | taskId, |
|
|
std::function< void()> | task, |
|
|
const std::shared_ptr< void > & | ) |
|
inlinevirtual |
Execute a task on a background thread.
- Parameters
-
taskId | ID to uniquely identify a task |
task | Function to be executed |
loggerContext | logger context that should be used with the logger delegate before the task is run |
◆ DispatchTask() [3/4]
virtual void TaskDispatcherDelegate::DispatchTask |
( |
const std::string & | taskId, |
|
|
std::function< void()> | task, |
|
|
int64_t | delaySeconds ) |
|
pure virtual |
Execute a task on a background thread with the given delay.
- Parameters
-
taskId | ID to uniquely identify a task |
task | Function to be executed |
delaySeconds | Delay (in seconds) before executing task |
◆ DispatchTask() [4/4]
virtual void TaskDispatcherDelegate::DispatchTask |
( |
const std::string & | taskId, |
|
|
std::function< void()> | task, |
|
|
int64_t | delaySeconds, |
|
|
const std::shared_ptr< void > & | ) |
|
inlinevirtual |
Execute a task on a background thread with the given delay.
- Parameters
-
taskId | ID to uniquely identify a task |
task | Function to be executed |
delaySeconds | Delay (in seconds) before executing task |
loggerContext | logger context that should be used with the logger delegate before the task is run |
◆ ExecuteTaskOnIndependentThread() [1/2]
virtual void TaskDispatcherDelegate::ExecuteTaskOnIndependentThread |
( |
const std::string & | taskId, |
|
|
std::function< void()> | task ) |
|
pure virtual |
Immediately execute a task on an independent thread.
- Parameters
-
taskId | ID to uniquely identify a task |
task | Function to be executed |
◆ ExecuteTaskOnIndependentThread() [2/2]
virtual void TaskDispatcherDelegate::ExecuteTaskOnIndependentThread |
( |
const std::string & | taskId, |
|
|
std::function< void()> | task, |
|
|
const std::shared_ptr< void > & | ) |
|
inlinevirtual |
Immediately execute a task on an independent thread.
- Parameters
-
taskId | ID to uniquely identify a task |
task | Function to be executed |
loggerContext | logger context that should be used with the logger delegate before the task is run |
The documentation for this class was generated from the following file: