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... | |
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
.
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.
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.