LAMA
|
Structure that specifies worker task and its state. More...
#include <LAMAThreadPool.hpp>
Public Types | |
enum | TaskState { DEFINED, QUEUED, RUNNING, FINISHED } |
Static Public Member Functions | |
static boost::shared_ptr < LAMAThreadTask > | create (boost::function< void()> work, unsigned int taskId, int numOmpThreads=0) |
Create a new task as a shared pointer. | |
Data Fields | |
boost::function< void()> | mWork |
task function to be executed | |
volatile TaskState | mState |
current state of the task | |
bool | mException |
true if task got an exception | |
unsigned int | mTaskId |
unique task id | |
int | ompThreads |
number of OpenMP threads to be used |
Structure that specifies worker task and its state.
As this structure might be used either by a running thread or by the thread that issued the task it should always be used via a shared pointer so that ownership never matters.
boost::shared_ptr< LAMAThreadTask > lama::LAMAThreadTask::create | ( | boost::function< void()> | work, |
unsigned int | taskId, | ||
int | numOmpThreads = 0 |
||
) | [static] |
Create a new task as a shared pointer.
References DEFINED.
Referenced by lama::LAMAThreadPool::schedule().
true if task got an exception
volatile TaskState lama::LAMAThreadTask::mState |
current state of the task
unsigned int lama::LAMAThreadTask::mTaskId |
unique task id
boost::function<void()> lama::LAMAThreadTask::mWork |
task function to be executed
number of OpenMP threads to be used