Server
API Reference Guide
Product Documentation:

Rogue Wave Server
Documentation Home
List of all members | Public Member Functions
IlsRWLocker Class Reference

API FOR ADVANCED USERS – This class is a wrapper 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. More...

#include <ilserver/ilthread.h>

Public Member Functions

 IlsRWLocker (IlsRWLock *m=0, IlsRWLockType t=ILS_NO_LOCK)
 Constructor. More...
 
 ~IlsRWLocker ()
 The destructor unlocks the readers/writer lock if it is non-null.
 
void assign (IlsRWLock *m=0, IlsRWLockType t=ILS_NO_LOCK)
 This member function assigns the readers/writer lock. More...
 

Detailed Description

API FOR ADVANCED USERS – This class is a wrapper 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.

Library: server
and mvcomp

This class can only be used with the class IlsRWLock.

Warning
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.
See also
IlsRWLock, IlsThread.

Constructor & Destructor Documentation

◆ IlsRWLocker()

IlsRWLocker::IlsRWLocker ( IlsRWLock m = 0,
IlsRWLockType  t = ILS_NO_LOCK 
)

Constructor.

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.

Member Function Documentation

◆ assign()

void IlsRWLocker::assign ( IlsRWLock m = 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.