Logo Search packages:      
Sourcecode: pwlib version File versions  Download package

DelayThread Class Reference

#include <main.h>

Inheritance diagram for DelayThread:

PThread PObject

List of all members.

Detailed Description

This class is a simple simple thread that just creates, waits a period of time, and exits.It is designed to test the PwLib methods for reporting the status of a thread. This class will be created over and over- millions of times is possible if left long enough. If the pwlib thread status functions are broken, a segfault will result. Past enxperience has found a fault in pwlib with the BusyWait option on, with SMP machines and a delay period of 20ms

Definition at line 62 of file main.h.

Comparison functions

virtual Comparison Compare (const PObject &obj) const
virtual Comparison CompareObjectMemoryDirect (const PObject &obj) const
bool operator!= (const PObject &obj) const
bool operator< (const PObject &obj) const
bool operator<= (const PObject &obj) const
bool operator== (const PObject &obj) const
bool operator> (const PObject &obj) const
bool operator>= (const PObject &obj) const
enum  Comparison { LessThan = -1, EqualTo = 0, GreaterThan = 1 }

Run Time Type functions

virtual const char * GetClass (unsigned=0) const
virtual BOOL InternalIsDescendant (const char *clsName) const
BOOL IsClass (const char *cls) const
static const char * Class ()

Control functions

virtual Priority GetPriority () const
virtual PString GetThreadName () const
virtual BOOL IsSuspended () const
virtual BOOL IsTerminated () const
virtual void Restart ()
virtual void Resume ()
virtual void SetAutoDelete (AutoDeleteFlag deletion=AutoDeleteThread)
void SetNoAutoDelete ()
virtual void SetPriority (Priority priorityLevel)
virtual void SetThreadName (const PString &name)
virtual void Suspend (BOOL susp=TRUE)
virtual void Terminate ()
BOOL WaitForTermination (const PTimeInterval &maxWait) const
void WaitForTermination () const
static void Sleep (const PTimeInterval &delay)
 Suspend the current thread for the specified amount of time.


virtual PThreadIdentifier GetThreadId () const
static PThreadCreate (const PNotifier &notifier, INT parameter=0, AutoDeleteFlag deletion=AutoDeleteThread, Priority priorityLevel=NormalPriority, const PString &threadName=PString::Empty(), PINDEX stackSize=10000)
static PThreadCurrent ()
static PThreadIdentifier GetCurrentThreadId ()
static void Yield ()

I/O functions

virtual void ReadFrom (istream &strm)
ostream & operator<< (ostream &strm, const PObject &obj)
istream & operator>> (istream &strm, PObject &obj)

Public Types

enum  AutoDeleteFlag { AutoDeleteThread, NoAutoDeleteThread }
 Codes for thread autodelete flag. More...
enum  Priority {
  LowestPriority, LowPriority, NormalPriority, HighPriority,
  HighestPriority, NumPriorities
 Codes for thread priorities. More...

Public Member Functions

 DelayThread (PINDEX _delay, BOOL)
 DelayThread (PINDEX _delay)
void Main ()
void PXAbortBlock () const
int PXBlockOnChildTerminate (int pid, const PTimeInterval &timeout)
int PXBlockOnIO (int handle, int type, const PTimeInterval &timeout)
Miscellaneous functions
virtual PObjectClone () const
virtual PINDEX HashFunction () const
Overrides from PObject
void PrintOn (ostream &strm) const

Protected Member Functions

void InitialiseProcessThread ()

Protected Attributes

PINDEX delay

Private Member Functions

 PCLASSINFO (DelayThread, PThread)


class PTrace::Block

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

Generated by  Doxygen 1.6.0   Back to index