A class for managing shared and exclusive access to resources.
More...
#include <xmltooling/util/Threads.h>
Public Member Functions |
virtual int | rdlock ()=0 |
| Obtains a shared lock.
|
virtual int | wrlock ()=0 |
| Obtains an exclusive lock.
|
virtual int | unlock ()=0 |
| Unlocks the lock.
|
Static Public Member Functions |
static RWLock * | create () |
| Creates a new read/write lock.
|
Detailed Description
A class for managing shared and exclusive access to resources.
Member Function Documentation
static RWLock* xmltooling::RWLock::create |
( |
| ) |
|
|
static |
Creates a new read/write lock.
- Returns
- the new lock
virtual int xmltooling::RWLock::rdlock |
( |
| ) |
|
|
pure virtual |
Obtains a shared lock.
- Returns
- 0 for success, non-zero for failure
virtual int xmltooling::RWLock::unlock |
( |
| ) |
|
|
pure virtual |
Unlocks the lock.
- Returns
- 0 for success, non-zero for failure
virtual int xmltooling::RWLock::wrlock |
( |
| ) |
|
|
pure virtual |
Obtains an exclusive lock.
- Returns
- 0 for success, non-zero for failure
The documentation for this class was generated from the following file: