OpendTect 8.0
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
Threads::Locker Class Reference

Locks the lock, shutting out access from other threads if needed. More...

#include <threadlock.h>

Public Types

enum  RWType { ReadLock , WriteLock }
 
enum  WaitType { WaitIfLocked , DontWaitForLock }
 

Public Member Functions

 Locker (const Locker &)=delete
 
 Locker (Lock &)
 
 Locker (Lock &, RWType)
 
 Locker (Lock &, RWType, WaitType)
 
 Locker (Lock &, WaitType)
 
 Locker (Lock &, WaitType, RWType)
 
virtual ~Locker ()
 
bool convertToWriteLock ()
 
bool isLocked () const
 
Lockeroperator= (const Locker &)=delete
 
void reLock (WaitType wt=WaitIfLocked)
 < Locker goes out of scope
 
void unlockNow ()
 

Protected Attributes

bool isread_
 
Locklock_
 
bool needunlock_
 

Detailed Description

Locks the lock, shutting out access from other threads if needed.

<>

Member Enumeration Documentation

◆ RWType

Enumerator
ReadLock 
WriteLock 

◆ WaitType

Enumerator
WaitIfLocked 
DontWaitForLock 

Constructor & Destructor Documentation

◆ Locker() [1/6]

Threads::Locker::Locker ( Lock & )

◆ Locker() [2/6]

Threads::Locker::Locker ( Lock & ,
WaitType  )

◆ Locker() [3/6]

Threads::Locker::Locker ( Lock & ,
RWType  )

◆ Locker() [4/6]

Threads::Locker::Locker ( Lock & ,
WaitType ,
RWType  )

◆ Locker() [5/6]

Threads::Locker::Locker ( Lock & ,
RWType ,
WaitType  )

◆ ~Locker()

virtual Threads::Locker::~Locker ( )
inlinevirtual

◆ Locker() [6/6]

Threads::Locker::Locker ( const Locker & )
delete

Member Function Documentation

◆ convertToWriteLock()

bool Threads::Locker::convertToWriteLock ( )

◆ isLocked()

bool Threads::Locker::isLocked ( ) const
inline

◆ operator=()

Locker & Threads::Locker::operator= ( const Locker & )
delete

◆ reLock()

void Threads::Locker::reLock ( WaitType wt = WaitIfLocked)

< Locker goes out of scope

◆ unlockNow()

void Threads::Locker::unlockNow ( )

Member Data Documentation

◆ isread_

bool Threads::Locker::isread_
protected

◆ lock_

Lock& Threads::Locker::lock_
protected

◆ needunlock_

bool Threads::Locker::needunlock_
protected

Generated at for the OpendTect seismic interpretation project. Copyright (C): dGB Beheer B.V. 1995-2025