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

Public Member Functions | Protected Attributes

PWaitAndSignal Class Reference

#include <psync.h>

Collaboration diagram for PWaitAndSignal:
Collaboration graph
[legend]

List of all members.

Public Member Functions

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

Protected Attributes

PSyncsync

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.


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

Generated by  Doxygen 1.6.0   Back to index