A class that defines the interface to the MIP SDK task dispatcher.
More...
#include <src/api/mip/task_dispatcher_delegate.h>
|
virtual void | CancelAllTasks ()=0 |
| Cancel all background tasks.
|
|
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 | 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.
|
|
A class that defines the interface to the MIP SDK task dispatcher.
Definition at line 48 of file task_dispatcher_delegate.h.
◆ 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
Referenced by CancelTask().
◆ 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
Definition at line 136 of file task_dispatcher_delegate.h.
136 {
138 }
virtual bool CancelTask(const std::string &taskId)=0
Cancel a background task.
References CancelTask().
◆ 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 |
Referenced by DispatchTask(), and DispatchTask().
◆ 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 |
Definition at line 65 of file task_dispatcher_delegate.h.
68 {
70 }
virtual void DispatchTask(const std::string &taskId, std::function< void()> task)=0
Execute a task on a background thread.
References DispatchTask().
◆ 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 |
Definition at line 89 of file task_dispatcher_delegate.h.
References DispatchTask().
◆ 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 |
Referenced by ExecuteTaskOnIndependentThread().
◆ 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 |
Definition at line 112 of file task_dispatcher_delegate.h.
115 {
117 }
virtual void ExecuteTaskOnIndependentThread(const std::string &taskId, std::function< void()> task)=0
Immediately execute a task on an independent thread.
References ExecuteTaskOnIndependentThread().
The documentation for this class was generated from the following file: