libpcidsk
|
Mutex interface class. More...
Public Member Functions | |
virtual int | Acquire ()=0 |
Acquire the mutex. | |
virtual int | Release ()=0 |
Release the mutex. |
Mutex interface class.
The Mutex class is the standard interface for mutexes in the PCIDSK library. A mutex provides critical section locking in multi-threaded applications. Applications may provide custom mutex implementations by passing their own CreateMutex() implementation in PCIDSK::PCIDSKInterfaces instead of the default one provided by the library (CreateDefaultMutex()). The library will create mutexes using the PCIDSK::PCIDSKInterfaces::CreateMutex() function.
Note that mutexes are created in the unlocked condition.
Mutexes may be destroyed with delete when no longer required.
int PCIDSK::Mutex::Acquire | ( | ) | [pure virtual] |
Acquire the mutex.
Note that control will block in Acquire() until such time as the mutex can be acquired for this thread.
int PCIDSK::Mutex::Release | ( | ) | [pure virtual] |
Release the mutex.
Release this mutex so that it may be acquired by another thread.