#include <CCAsyncTaskPool.h>
| Enumerator |
|---|
| TASK_IO |
|
| TASK_NETWORK |
|
| TASK_OTHER |
|
| TASK_MAX_TYPE |
|
| Enumerator |
|---|
| TASK_IO |
|
| TASK_NETWORK |
|
| TASK_OTHER |
|
| TASK_MAX_TYPE |
|
| Enumerator |
|---|
| TASK_IO |
|
| TASK_NETWORK |
|
| TASK_OTHER |
|
| TASK_MAX_TYPE |
|
| static void destoryInstance |
( |
| ) |
|
|
static |
| local destoryInstance |
( |
| ) |
|
|
static |
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 |
| f | task can be lambda function |
| args | task parameters |
| var enqueue |
( |
var |
type, |
|
|
var |
callback, |
|
|
var |
callbackParam, |
|
|
var |
f |
|
) |
| |
|
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 |
| f | task can be lambda function |
| args | task parameters |
| local enqueue |
( |
local |
type, |
|
|
local |
callback, |
|
|
local |
callbackParam, |
|
|
local |
f |
|
) |
| |
|
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 |
| f | task can be lambda function |
| args | task parameters |
stop tasks
- Parameters
-
| type | task type you want to stop |
| var stopTasks |
( |
var |
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 |
The documentation for this class was generated from the following file: