Public Member Functions | Private Attributes | List of all members
icl_core::thread::RWLock Class Reference

#include <RWLock.h>

Inheritance diagram for icl_core::thread::RWLock:
Inheritance graph
[legend]

Public Member Functions

bool readLock ()
 
bool readLock (const ::icl_core::TimeStamp &timeout)
 
bool readLock (const ::icl_core::TimeSpan &timeout)
 
 RWLock ()
 
bool tryReadLock ()
 
bool tryWriteLock ()
 
void unlock ()
 
bool writeLock ()
 
bool writeLock (const ::icl_core::TimeStamp &timeout)
 
bool writeLock (const ::icl_core::TimeSpan &timeout)
 
virtual ~RWLock ()
 

Private Attributes

RWLockImplm_impl
 

Additional Inherited Members

- Protected Member Functions inherited from icl_core::Noncopyable
 Noncopyable ()
 
virtual ~Noncopyable ()
 

Detailed Description

Implements a platform independent read/write lock.

Definition at line 47 of file RWLock.h.

Constructor & Destructor Documentation

icl_core::thread::RWLock::RWLock ( )

Creates a read/write lock.

Definition at line 46 of file RWLock.cpp.

icl_core::thread::RWLock::~RWLock ( )
virtual

Destroys a read/write lock.

Definition at line 78 of file RWLock.cpp.

Member Function Documentation

bool icl_core::thread::RWLock::readLock ( )

Tries to get a shared read lock on the RWLock.

Returns
true if locking succeeds, or false on a timeout or every other failure.

Definition at line 85 of file RWLock.cpp.

bool icl_core::thread::RWLock::readLock ( const ::icl_core::TimeStamp timeout)

Tries to get a shared read lock on the RWLock with an absolute timeout. The function may then return with false if the absolute time passes without being able to lock the RWLock.

Definition at line 94 of file RWLock.cpp.

bool icl_core::thread::RWLock::readLock ( const ::icl_core::TimeSpan timeout)

Tries to get a shared read lock on the RWLock with a relative timeout. The function may then return with false if the relative time passes without being able to lock the RWLock.

Definition at line 104 of file RWLock.cpp.

bool icl_core::thread::RWLock::tryReadLock ( )

Tries to get a shared read lock on the RWLock without blocking. The mutex is locked if it is available.

Returns
true if the RWLock has been locked, false otherwise.

Definition at line 114 of file RWLock.cpp.

bool icl_core::thread::RWLock::tryWriteLock ( )

Tries to get a shared write lock on the RWLock without blocking. The RWLock is locked if it is available.

Returns
true if the RWLock has been locked, false otherwise.

Definition at line 152 of file RWLock.cpp.

void icl_core::thread::RWLock::unlock ( )

Releases a shared read or write lock on the RWLock.

Definition at line 161 of file RWLock.cpp.

bool icl_core::thread::RWLock::writeLock ( )

Tries to get a shared write lock on the RWLock.

Returns
true if locking succeeds, or false on a timeout or every other failure.

Definition at line 123 of file RWLock.cpp.

bool icl_core::thread::RWLock::writeLock ( const ::icl_core::TimeStamp timeout)

Tries to get a shared write lock on the RWLock with an absolute timeout. The function may then return with false if the absolute time passes without being able to lock the RWLock.

Definition at line 132 of file RWLock.cpp.

bool icl_core::thread::RWLock::writeLock ( const ::icl_core::TimeSpan timeout)

Tries to get a shared write lock on the RWLock with a relative timeout. The function may then return with false if the relative time passes without being able to lock the RWLock.

Definition at line 142 of file RWLock.cpp.

Member Data Documentation

RWLockImpl* icl_core::thread::RWLock::m_impl
private

Definition at line 174 of file RWLock.h.


The documentation for this class was generated from the following files:


fzi_icl_core
Author(s):
autogenerated on Mon Jun 10 2019 13:17:59