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

Public Member Functions

PTimedMutex Class Reference

#include <mutex.h>

Inheritance diagram for PTimedMutex:
Inheritance graph
Collaboration diagram for PTimedMutex:
Collaboration graph

List of all members.

Public Member Functions

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

Run Time Type functions

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

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 }

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)

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;



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


... {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.

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

Generated by  Doxygen 1.6.0   Back to index