VCF::Lock Class Reference
The Lock class represents a way to automatically lock or unlock a syncronizeable primitive, like a thread, mutex, or semaphore, by having the lifetime of the Lock stack based. More...
#include <vcf/FoundationKit/Lock.h>
Inheritance diagram for VCF::Lock:

Public Member Functions | |
| Lock (VCF::SynchObject &synchObject) | |
| virtual | ~Lock () |
Protected Attributes | |
| bool | validSynchObject_ |
| VCF::SynchObject & | synchObject_ |
Detailed Description
The Lock class represents a way to automatically lock or unlock a syncronizeable primitive, like a thread, mutex, or semaphore, by having the lifetime of the Lock stack based.This frees the developer from having to remember to call lock or unlock on the sync object. For example:
Mutex* mutex = //get a mutex Lock l( *mutex ); //do some operations on a shared resource
- See also:
- SynchObject
- Author:
- Tiziano Franzoi, Nov 15, 2001
Constructor & Destructor Documentation
|
|
|
|
|
|
Member Data Documentation
|
|
|
|
|
|
The documentation for this class was generated from the following file:
- vcf/FoundationKit/Lock.h
