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

PTimedMutex Class Reference

#include <mutex.h>

Inheritance diagram for PTimedMutex:

PObject PCondMutex PIntCondMutex

List of all members.


Detailed Description

This class defines a thread mutual exclusion object. A mutex is where a piece of code or data cannot be accessed by more than one thread at a time. To prevent this the PMutex is used in the following manner: {verbatim} PMutex mutex;

...

mutex.Wait();

... critical section - only one thread at a time here.

mutex.Signal();

... {verbatim} The first thread will pass through the Wait()# function, a second thread will block on that function until the first calls the Signal()# function, releasing the second thread.

Definition at line 131 of file mutex.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 ()

I/O functions

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

Public Member Functions

 PTimedMutex (const PTimedMutex &mutex)
Miscellaneous functions
virtual PObjectClone () const
virtual PINDEX HashFunction () const
Operations
virtual void Signal ()=0
virtual void Wait ()=0

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

Generated by  Doxygen 1.6.0   Back to index