OpendTect
7.0
|
Lock that permits multiple readers to lock the object at the same time, but it will not allow any readers when writelocked, and no writelock is allowed when readlocked. More...
Public Member Functions | |
ReadWriteLock () | |
ReadWriteLock (const ReadWriteLock &) | |
virtual | ~ReadWriteLock () |
void | convPermissiveToWriteLock () |
bool | convReadToWriteLock () |
void | convWriteToPermissive () |
void | convWriteToReadLock () |
Lock MUST be writeLocked when calling. More... | |
void | permissiveWriteLock () |
void | permissiveWriteUnLock () |
void | readLock () |
No writers will be active. More... | |
void | readUnLock () |
bool | tryReadLock () |
No writers will be active. More... | |
bool | tryWriteLock () |
No readers will be active. More... | |
void | writeLock () |
No readers will be active. More... | |
void | writeUnLock () |
Protected Attributes | |
int | nrreaders_ |
char | status_ |
ConditionVar | statuscond_ |
Lock that permits multiple readers to lock the object at the same time, but it will not allow any readers when writelocked, and no writelock is allowed when readlocked.
<>
Threads::ReadWriteLock::ReadWriteLock | ( | ) |
Threads::ReadWriteLock::ReadWriteLock | ( | const ReadWriteLock & | ) |
|
virtual |
void Threads::ReadWriteLock::convPermissiveToWriteLock | ( | ) |
bool Threads::ReadWriteLock::convReadToWriteLock | ( | ) |
Lock MUST be readLocked when calling. Object Will always be in write-lock status on return.
void Threads::ReadWriteLock::convWriteToPermissive | ( | ) |
void Threads::ReadWriteLock::convWriteToReadLock | ( | ) |
Lock MUST be writeLocked when calling.
void Threads::ReadWriteLock::permissiveWriteLock | ( | ) |
Same as readlock, but I'm guaranteed to convert to writelock without giving up my lock. Only one thread may have the permissive write lock at any given time.
void Threads::ReadWriteLock::permissiveWriteUnLock | ( | ) |
void Threads::ReadWriteLock::readLock | ( | ) |
No writers will be active.
void Threads::ReadWriteLock::readUnLock | ( | ) |
bool Threads::ReadWriteLock::tryReadLock | ( | ) |
No writers will be active.
bool Threads::ReadWriteLock::tryWriteLock | ( | ) |
No readers will be active.
void Threads::ReadWriteLock::writeLock | ( | ) |
No readers will be active.
void Threads::ReadWriteLock::writeUnLock | ( | ) |
|
protected |
|
protected |
|
protected |
Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2024