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

PWaitAndSignal Class Reference

#include <psync.h>

List of all members.


Detailed Description

This class waits for the semaphore on construction and automatically signals the semaphore on destruction. Any descendent of PSemaphore may be used.

This is very usefull for constructs such as: {verbatim} void func() { PWaitAndSignal mutexWait(myMutex); if (condition) return; do_something(); if (other_condition) return; do_something_else(); } {verbatim}

Definition at line 101 of file psync.h.


Public Member Functions

 PWaitAndSignal (const PSync &sem, BOOL wait=TRUE)
 ~PWaitAndSignal ()

Protected Attributes

PSync & sync

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

Generated by  Doxygen 1.6.0   Back to index