The PLT_TaskManager class maintains a list of runnable tasks.
More...
#include <PltTaskManager.h>
|
| | PLT_TaskManager (NPT_Cardinal max_tasks=0) |
| | Create a new Task Manager. More...
|
| |
| virtual NPT_Result | StartTask (PLT_ThreadTask *task, NPT_TimeInterval *delay=NULL, bool auto_destroy=true) |
| | Start a new new task and associates it with this task manager. More...
|
| |
|
NPT_Result | Abort () |
| | Stop all tasks associated with this task manager.
|
| |
|
NPT_Result | Reset () |
| | Reset task manager after an Abort so new tasks can be queued.
|
| |
| NPT_Cardinal | GetMaxTasks () |
| | Returns the max number of concurrent tasks allowed. More...
|
| |
The PLT_TaskManager class maintains a list of runnable tasks.
During shutdown, it can stop all running tasks. Additionally, it can limit the number of tasks that can run at any given time.
◆ PLT_TaskManager()
| PLT_TaskManager::PLT_TaskManager |
( |
NPT_Cardinal |
max_tasks = 0 | ) |
|
Create a new Task Manager.
- Parameters
-
| max_tasks | Maximum number of concurrent tasks that the task manager will allow. When the value is reached, a thread calling AddTask will block until a task has finished. |
◆ GetMaxTasks()
| NPT_Cardinal PLT_TaskManager::GetMaxTasks |
( |
| ) |
|
|
inline |
Returns the max number of concurrent tasks allowed.
0 for no limit.
◆ StartTask()
Start a new new task and associates it with this task manager.
- Parameters
-
| task | new task |
| delay | optional time interval to wait before launching the new task |
| auto_destroy | a flag to indicate if the task is owned by someone else and thus should not destroy itself when done. |
The documentation for this class was generated from the following files:
- lib/libUPnP/Platinum/Source/Core/PltTaskManager.h
- lib/libUPnP/Platinum/Source/Core/PltTaskManager.cpp