Public Member Functions | Static Public Member Functions

Thread Class Reference
[Classes for basic data types and vectors/arrays (tjutils library)]

#include <tjthread.h>

Inherited by ThreadedLoop< In, Out, Local >::WorkThread.

List of all members.

Public Member Functions

 Thread ()
bool start (unsigned int stack_size=0)
bool wait ()
virtual void run ()=0

Static Public Member Functions

static int self ()

Detailed Description

Base class for threads. Derive from this and implement the run() function to use it.

Definition at line 163 of file tjthread.h.


Constructor & Destructor Documentation

Thread::Thread (  ) 

Constructs thread object with the given label.


Member Function Documentation

virtual void Thread::run (  )  [pure virtual]

Implement to run threads execution path.

static int Thread::self (  )  [static]

Returns thread-unique ID of the current thread.

bool Thread::start ( unsigned int  stack_size = 0  ) 

Starts the thread. 'stack_size' is used as the threads stack size if not zero (in which case the systems default stack size is used). Returns 'true' only on sucess.

bool Thread::wait (  ) 

Waits for the thread to finish. Returns 'true' only on sucess.


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