This class allows to perform background operations without having to manipulate threads.
More...
|
| void | stopTasks (TaskType type) |
| | Stop tasks. More...
|
| |
| void | enqueue (TaskType type, TaskCallBack callback, void *callbackParam, std::function< void()> task) |
| | Enqueue a asynchronous task. More...
|
| |
| void | enqueue (AsyncTaskPool::TaskType type, std::function< void()> task) |
| | Enqueue a asynchronous task. More...
|
| |
This class allows to perform background operations without having to manipulate threads.
| static void destoryInstance |
( |
| ) |
|
|
inlinestatic |
| local destoryInstance |
( |
| ) |
|
|
inlinestatic |
| void stopTasks |
( |
TaskType |
type | ) |
|
|
inline |
Stop tasks.
- Parameters
-
| type | Task type you want to stop. |
| local stopTasks |
( |
local |
type | ) |
|
|
inline |
Stop tasks.
- Parameters
-
| type | Task type you want to stop. |
| void enqueue |
( |
AsyncTaskPool::TaskType |
type, |
|
|
TaskCallBack |
callback, |
|
|
void * |
callbackParam, |
|
|
std::function< void()> |
task |
|
) |
| |
|
inline |
Enqueue a asynchronous task.
- Parameters
-
| type | task type is io task, network task or others, each type of task has a thread to deal with it. |
| callback | callback when the task is finished. The callback is called in the main thread instead of task thread. |
| callbackParam | parameter used by the callback. |
| task | task can be lambda function to be performed off thread. |
| void enqueue |
( |
AsyncTaskPool::TaskType |
type, |
|
|
std::function< void()> |
task |
|
) |
| |
|
inline |
Enqueue a asynchronous task.
- Parameters
-
| type | task type is io task, network task or others, each type of task has a thread to deal with it. |
| task | task can be lambda function to be performed off thread. |
The documentation for this class was generated from the following file: