User Documentation
Centre for Vision, Speech & Signal Processing
DEVELOP IN NAMESPACE AMMA TREE ROOT AMMA SEARCH AMMA HOME
 

  PUBLIC
RWLockHoldC::RWLockHoldC(const RWLockC &,BooleanT,BooleanT)
RWLockHoldC::Unlock(void)
RWLockHoldC::~RWLockHoldC(void)
RWLockHoldC::LockRd(void)
RWLockHoldC::LockWr(void)
RWLockHoldC::IsReadLocked(void) const
RWLockHoldC::IsWriteLocked(void) const
RWLockHoldC
 
RWLock locking class.
 
include "amma/PThread/RWLock.hh"
User Level:Default
Library:PThreadCXX
Example:exChild.cc
Section:Utilities.Threads
In Scope:PThread

Comments:
Used to control locks on RWLockC for exception safe resoures locking. It is the users responsability to ensure that the RWLockC remains valid for the lifetime of any RWLockHoldC instance.

SMALL OBJECT

Variables:
Methods:
RWLockHoldC(const RWLockC & m,BooleanT readOnly = true,BooleanT tryOnly = false)
Create a lock on a rwlock.
This may not seem like a good idea, but it allows otherwise constant functions to lock out other accesses to data without undue faffing.

void Unlock()

~RWLockHoldC()
Create a lock on a rwlock.

void LockRd()
relock for read

void LockWr()
relock for write

BooleanT IsReadLocked() const
Test if safe for reading.
This will return true if either a write or read lock is inplace.

BooleanT IsWriteLocked() const
Test if safe for writing.


Programmer:Charles Galambos, Documentation by CxxDoc: Tue Mar 20 10:48:08 2001