#include <framework.h>
Public Member Functions | |
AAA_Task (AAA_SchedulingPolicy policy=AAA_SCHED_FIFO, char *name=0, unsigned numPriority=1, unsigned maxWeight=1) | |
void | Start (int n) throw (AAA_Error) |
void | Stop () |
Wait until all threads complete. | |
long | ScheduleTimer (ACE_Event_Handler *eventHandler, const void *arg, ACE_Time_Value delay, ACE_Time_Value interval=0) |
int | CancelTimer (ACE_UINT32 timerHandle, const void **arg) |
bool | Running () |
AAA_GroupedJob & | Job () |
AAA_JobHandle< AAA_GroupedJob > & | JobHandle () |
|
Constuctor. The int parameter specifies the number of job serving threads and the name parameter specifies the name of the task. The policy parameter specifies the scheduling policy represented by a "bit-or" combination of AAA_SCHED_FIFO, AAA_SCHED_WFQ and AAA_SCHED_PRIORITY. The task name will be used for logging purpose. The number of priority classes and the maximum weight value can also be specified. |
|
Cancel the scheduled timer. The canceled timer argument is returned in the second argument. |
|
Schedule a timer event to occur with a specified time delay. The timer event will be continuously occur at the specified interval parameter if the interval is non-zero. The specified argment is used when the event is executed. |
|
Activate specified number of threads. A negative integer is thrown when the task could not be started. |