Public Member Functions | Public Attributes | Private Attributes | List of all members
xsens::PooledTask Class Reference

A class that contains a task and some administrative stuff. More...

Public Member Functions

 PooledTask ()
 
void signalCompleted () noexcept
 
bool waitForCompletion (uint32_t timeout=UINT32_MAX)
 
 ~PooledTask ()
 

Public Attributes

volatile std::atomic< bool > m_canceling
 
std::vector< std::shared_ptr< PooledTask > > m_dependentTasks
 A list of tasks that are waiting for this task to complete. More...
 
unsigned int m_id
 The id that was assigned to the task by the ThreadPool. More...
 
ThreadPoolTaskm_task
 The task that is to be executed. More...
 
XsThreadId m_threadId
 

Private Attributes

volatile std::atomic_bool m_completed
 
WaitCondition m_completedCondition
 
Mutex m_completedMutex
 

Detailed Description

A class that contains a task and some administrative stuff.

Definition at line 130 of file xsens_threadpool.cpp.

Constructor & Destructor Documentation

◆ PooledTask()

xsens::PooledTask::PooledTask ( )
inline

Definition at line 139 of file xsens_threadpool.cpp.

◆ ~PooledTask()

xsens::PooledTask::~PooledTask ( )
inline

Definition at line 150 of file xsens_threadpool.cpp.

Member Function Documentation

◆ signalCompleted()

void xsens::PooledTask::signalCompleted ( )
inlinenoexcept

Definition at line 170 of file xsens_threadpool.cpp.

◆ waitForCompletion()

bool xsens::PooledTask::waitForCompletion ( uint32_t  timeout = UINT32_MAX)
inline

Definition at line 156 of file xsens_threadpool.cpp.

Member Data Documentation

◆ m_canceling

volatile std::atomic<bool> xsens::PooledTask::m_canceling

Definition at line 137 of file xsens_threadpool.cpp.

◆ m_completed

volatile std::atomic_bool xsens::PooledTask::m_completed
private

Definition at line 182 of file xsens_threadpool.cpp.

◆ m_completedCondition

WaitCondition xsens::PooledTask::m_completedCondition
private

Definition at line 184 of file xsens_threadpool.cpp.

◆ m_completedMutex

Mutex xsens::PooledTask::m_completedMutex
private

Definition at line 183 of file xsens_threadpool.cpp.

◆ m_dependentTasks

std::vector<std::shared_ptr<PooledTask> > xsens::PooledTask::m_dependentTasks

A list of tasks that are waiting for this task to complete.

Definition at line 135 of file xsens_threadpool.cpp.

◆ m_id

unsigned int xsens::PooledTask::m_id

The id that was assigned to the task by the ThreadPool.

Definition at line 134 of file xsens_threadpool.cpp.

◆ m_task

ThreadPoolTask* xsens::PooledTask::m_task

The task that is to be executed.

Definition at line 133 of file xsens_threadpool.cpp.

◆ m_threadId

XsThreadId xsens::PooledTask::m_threadId

Definition at line 136 of file xsens_threadpool.cpp.


The documentation for this class was generated from the following file:


xsens_mti_driver
Author(s):
autogenerated on Sun Sep 3 2023 02:43:23