IlsRWLocker
 
IlsRWLocker
Category 
Thread utility class - API FOR ADVANCED USERS
Inheritance Path 
IlsRWLocker
Description 
IlsRWLocker is a wrapper class. A wrapper class is a class that locks the readers/writer lock in the constructor or when the readers/writer lock is assigned, and unlocks the readers/writer lock in the destructor. This class can only be used with the class IlsRWLock.
The wrapper must not be used within multiple threads. Only the pointer to the readers/writer lock that is being locked can be shared among different threads. This class is normally used as a local variable within a procedure.
Libraries 
<server> and <mvcomp>
Header File 
#include <ilserver/ilthread.h>
Synopsis 
class IlsRWLocker
{
public:
IlsRWLocker(IlsRWLock* = 0, IlsRWLockType t = ILS_NO_LOCK);
virtual ~IlsRWLocker();
void assign(IlsRWLock* = 0, IlsRWLockType t = ILS_NO_LOCK);
};
Constructor 
IlsRWLocker(IlsRWLock* = 0, IlsRWLockType t = ILS_NO_LOCK);
The first argument to the constructor is a pointer to the readers/writer lock that you want to lock. The second argument is used to specify what type of lock, if any, to take.
Destructor 
virtual ~IlsRWLocker();
Member Functions 
void assign(IlsRWLock* = 0, IlsRWLockType t = ILS_NO_LOCK);
This member function assigns the readers/writer lock. The readers/writer lock can be assigned at any time. Setting the assigned readers/writer lock to zero will prevent the readers/writer lock from being unlocked when the readers/writer lock wrapper is destroyed. Assigning a readers/writer lock will cause the old readers/writer lock,
if any, to be unlocked, and the new readers/writer lock, if any, to be locked.
See Also 
IlsRWLock, IlsThread

Version 5.8
Copyright © 2014, Rogue Wave Software, Inc. All Rights Reserved.