SOFA API  c76874b7
Open source framework for multi-physics simuation
sofa::simulation::WorkerThread Class Reference

#include <DefaultTaskScheduler.h>

Public Member Functions

 WorkerThread (DefaultTaskScheduler *const &taskScheduler, const int index, const std::string &name="Worker")
 
 ~WorkerThread ()
 
bool addTask (Task *pTask)
 
void workUntilDone (Task::Status *status)
 
const Task::StatusgetCurrentStatus () const
 
const char * getName () const
 
int getType () const
 
const std::thread::id getId ()
 
const std::deque< Task * > * getTasksQueue ()
 
std::uint64_t getTaskCount ()
 
int GetWorkerIndex ()
 
void * allocate ()
 
void free (void *ptr)
 

Static Public Member Functions

static WorkerThreadgetCurrent ()
 

Friends

class DefaultTaskScheduler
 

Constructor details

sofa::simulation::WorkerThread::WorkerThread ( DefaultTaskScheduler *const &  taskScheduler,
const int  index,
const std::string &  name = "Worker" 
)
sofa::simulation::WorkerThread::~WorkerThread ( )

Function details

bool sofa::simulation::WorkerThread::addTask ( Task pTask)
void* sofa::simulation::WorkerThread::allocate ( )
void sofa::simulation::WorkerThread::free ( void *  ptr)
WorkerThread * sofa::simulation::WorkerThread::getCurrent ( )
static
const Task::Status* sofa::simulation::WorkerThread::getCurrentStatus ( ) const
inline
const std::thread::id sofa::simulation::WorkerThread::getId ( )
const char* sofa::simulation::WorkerThread::getName ( ) const
inline
std::uint64_t sofa::simulation::WorkerThread::getTaskCount ( )
inline
const std::deque<Task*>* sofa::simulation::WorkerThread::getTasksQueue ( )
inline
int sofa::simulation::WorkerThread::getType ( ) const
inline
int sofa::simulation::WorkerThread::GetWorkerIndex ( )
void sofa::simulation::WorkerThread::workUntilDone ( Task::Status status)

Related details

friend class DefaultTaskScheduler
friend