NeoPZ
|
Helper class for ordering the tasks that the user have requested. More...
#include <TPZTask.h>
Public Member Functions | |
TPZTask (const int priority, TPZAutoPointer< std::packaged_task< void(void)>> &task, TPZTaskGroup *taskGroup=NULL) | |
int | priority () const |
virtual void | start () |
virtual void | Cancel () |
virtual | ~TPZTask () |
Protected Types | |
enum | EProcessingState { CREATED, SCHEDULED, STARTED, FINISHED } |
Protected Attributes | |
TPZAutoPointer< std::packaged_task< void(void)> > | mTask |
EProcessingState | mState |
TPZTaskGroup * | mTaskGroup |
Private Attributes | |
bool | mSystemTask |
int | mPriority |
Friends | |
struct | TPZTaskOrdering |
class | TPZThreadPool |
Helper class for ordering the tasks that the user have requested.
|
protected |
TPZTask::TPZTask | ( | const int | priority, |
TPZAutoPointer< std::packaged_task< void(void)>> & | task, | ||
TPZTaskGroup * | taskGroup = NULL |
||
) |
Definition at line 12 of file TPZTask.cpp.
References TPZTaskGroup::RegisterTask().
Referenced by TPZThreadPool::appendTaskToQueue().
|
virtual |
Definition at line 43 of file TPZTask.cpp.
|
virtual |
Definition at line 36 of file TPZTask.cpp.
References mTaskGroup, and TPZTaskGroup::Notify().
Referenced by TPZThreadPool::threadsLoop().
int TPZTask::priority | ( | ) | const |
Definition at line 23 of file TPZTask.cpp.
References mPriority.
Referenced by TPZThreadPool::checkForMaxAndMinPriority(), TPZTaskOrdering::operator()(), TPZThreadPool::reschedule(), and TPZThreadPool::TPZThreadPool().
|
virtual |
Reimplemented in TPZReschedulableTask.
Definition at line 27 of file TPZTask.cpp.
References mState, mTaskGroup, and TPZTaskGroup::Notify().
Referenced by TPZReschedulableTask::startInternal(), and TPZThreadPool::threadsLoop().
|
friend |
|
friend |
|
private |
Definition at line 44 of file TPZTask.h.
Referenced by priority(), and TPZThreadPool::runNow().
|
protected |
Definition at line 39 of file TPZTask.h.
Referenced by TPZThreadPool::run(), TPZThreadPool::runNow(), TPZReschedulableTask::start(), and start().
|
private |
Definition at line 43 of file TPZTask.h.
Referenced by TPZThreadPool::appendTaskToQueue(), and TPZTaskOrdering::operator()().
|
protected |
Definition at line 38 of file TPZTask.h.
Referenced by TPZThreadPool::run(), and TPZThreadPool::runNow().
|
protected |