![]() |
PIP 5.5.3
Platform-Independent Primitives
|
PIReadWriteLock read autolocker More...
#include <pireadwritelock.h>
Public Member Functions | |
| PIReadLocker (PIReadWriteLock &l, bool condition=true) | |
Constructs and lock for read PIReadWriteLock "l" if "condition" is true. | |
| ~PIReadLocker () | |
Release read lock on PIReadWriteLock if "condition" was true. | |
PIReadWriteLock read autolocker
When a PIReadLocker object is created, it lock PIReadWriteLock for read, if "condition" true. When control leaves the scope in which the PIReadLocker object was created, the PIReadLocker is destructed and unlock for read, if "condition" was true.
If "condition" false this class do nothing.
The PIReadLocker class is non-copyable.