DUNE: Uniform Navigational Environment  2016.05.0
DUNE::Concurrency::Thread Class Reference

Detailed Description

Threads are a way for a program to split itself into two or more simultaneously running tasks.

Public Member Functions

 Thread (void)
virtual ~Thread (void)
int getProcessorUsage (void)
- Public Member Functions inherited from DUNE::Concurrency::Runnable
 Runnable (void)
virtual ~Runnable (void)
void start (void)
void stop (void)
void join (void)
void stopAndJoin (void)
void setPriority (Scheduler::Policy policy, unsigned priority)
State getState (void)
bool isCreated (void)
bool isStopping (void)
bool isRunning (void)
bool isStarting (void)
bool isDead (void)

Protected Member Functions

void startImpl (void)
void stopImpl (void)
void joinImpl (void)
void setPriorityImpl (Scheduler::Policy policy, unsigned priority)
- Protected Member Functions inherited from DUNE::Concurrency::Runnable
virtual void run (void)=0


void * dune_concurrency_thread_entry_point (void *)

Additional Inherited Members

- Public Types inherited from DUNE::Concurrency::Runnable
enum  State {
  StateStarting, StateRunning, StateStopping, StateDead,

Constructor & Destructor Documentation

Thread::Thread ( void  )
Thread::~Thread ( void  )


Member Function Documentation

int Thread::getProcessorUsage ( void  )

Retrieve the percentage of CPU time used by this thread since the last call to this function or object creation.

On multi CPU systems the CPU time is an average.

percentage of the CPU time used or -1 if this value cannot be computed.
void Thread::joinImpl ( void  )
void Thread::setPriorityImpl ( Scheduler::Policy  policy,
unsigned  priority 
void Thread::stopImpl ( void  )

Friends And Related Function Documentation

void* dune_concurrency_thread_entry_point ( void *  )

Referenced by startImpl().

Collaboration diagram for DUNE::Concurrency::Thread:
Collaboration graph