A generic task implementation for the thread pool. More...
#include <xsens_threadpool.h>
Public Member Functions | |
virtual bool | exec ()=0 |
bool | isCanceling () const |
Returns true if the task has been told to cancel itself. More... | |
virtual unsigned int | needToWaitFor () |
This function gets called by PooledThread when the exec() function returns false to determine if we should wait for a specific task. More... | |
unsigned int | taskId () const |
Returns the task ID of the task or 0 if it doesn't have a proper ID (yet) More... | |
ThreadPoolTask () | |
virtual | ~ThreadPoolTask () |
Private Attributes | |
PooledTask * | m_container |
Friends | |
class | ThreadPool |
A generic task implementation for the thread pool.
Definition at line 82 of file xsens_threadpool.h.
|
inline |
Definition at line 87 of file xsens_threadpool.h.
|
inlinevirtual |
Definition at line 88 of file xsens_threadpool.h.
|
pure virtual |
Implemented in Xs4FileTask, xsens::ThreadPoolObjectDeleter< T >, and xsens::TaskCompletionWaiter.
bool xsens::ThreadPoolTask::isCanceling | ( | ) | const |
Returns true if the task has been told to cancel itself.
Definition at line 188 of file xsens_threadpool.cpp.
|
virtual |
This function gets called by PooledThread when the exec() function returns false to determine if we should wait for a specific task.
The default implementation returns 0 (no id to wait for)
Reimplemented in xsens::TaskCompletionWaiter.
Definition at line 119 of file xsens_threadpool.cpp.
unsigned int xsens::ThreadPoolTask::taskId | ( | ) | const |
Returns the task ID of the task or 0 if it doesn't have a proper ID (yet)
Definition at line 196 of file xsens_threadpool.cpp.
|
friend |
Definition at line 94 of file xsens_threadpool.h.
|
private |
Definition at line 95 of file xsens_threadpool.h.