Developer Documentation
Centre for Vision, Speech & Signal Processing
USER IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
VThread::VThread(int,BooleanT)
VThread::~VThread(void)
VThread::Execute(void)
VThread::Start(void)
VThread::End(void)
VThread::Yield(void)
VThread::Terminate(void)
VThread::Pause(void)
VThread::Continue(void)
VThread::SetPriority(int)
VThread::GetID(void)
VThread::GetCurrentThreadID(void)
VThread::GetCurrentThread(void)
VThread
 
Thread base class.
 
include "amma/Thread/VThread.hh"
User Level:Default
Library:VThread
Example:ex3DCanvas.cc
Section:Utilities.Threads
In Scope:std

Comments:
This class represents a single thread of execution within the program.

Use PThread (Posix threads) library instead.

Derived Classes: Variables:
VThreadBody * Body;

Methods:
VThread(int MinStackSize = 16000,BooleanT Bind = FALSE)
Construct a new thread.

~VThread()
Destroy a thread, this will suspend the execution of the thread. Care should be taken when deleting a thread to ensure its not holding any external resources. ------------- Base Interface ----------------------

BooleanT Execute(void)
Start thread running, use this command to start thread running after it has been created. This function can only be called once.

int Start(void)
Called when thread started. This function should be overloaded is a derived class. It is called with the new thread after Execute() is called. There is no need to call this function directly.

int End(void)
Called when thread terminates normally. Overloading this method is optional. There is no need to call this function directly. ------------- Execution control ---------------------- These may be called by any thread.

void Yield(void)
Yield control of processor, call if you wish a brief delay in execution.

void Terminate(void)
Terminate thread. Call to stop the thread running.

BooleanT Pause(void)
Stop thread running temporarly.

BooleanT Continue(void)
Continue thread running again after call to Pause().

BooleanT SetPriority(int Pri)
Set the priority of the process 0 to 32767, Higher faster. ------------- Thread ID ---------------------- Functions to identify threads.

int GetID(void)
Get a unique ID for this thread. NB. An id may no be assigned to the thread until after Execute() has been called.

IntT GetCurrentThreadID()
Get ID of current thread.

VThread * GetCurrentThread(void)
Get a pointer to the currently executing thread.


Programmer:Charles Galambos, Documentation by CxxDoc: Tue Mar 20 10:49:27 2001