Public Types | Public Member Functions | Private Member Functions
Poco::RWLock Class Reference

#include <RWLock.h>

Inheritance diagram for Poco::RWLock:
Inheritance graph
[legend]

List of all members.

Public Types

typedef ScopedRWLock ScopedLock

Public Member Functions

void readLock ()
 Destroys the Reader/Writer lock.
 RWLock ()
bool tryReadLock ()
bool tryWriteLock ()
void unlock ()
void writeLock ()
 ~RWLock ()
 Creates the Reader/Writer lock.

Private Member Functions

RWLockoperator= (const RWLock &)
 RWLock (const RWLock &)
 Releases the read or write lock.

Detailed Description

A reader writer lock allows multiple concurrent readers or one exclusive writer.

Definition at line 60 of file RWLock.h.


Member Typedef Documentation

Definition at line 65 of file RWLock.h.


Constructor & Destructor Documentation

Definition at line 50 of file RWLock.cpp.

Creates the Reader/Writer lock.

Definition at line 55 of file RWLock.cpp.

Poco::RWLock::RWLock ( const RWLock ) [private]

Releases the read or write lock.


Member Function Documentation

RWLock& Poco::RWLock::operator= ( const RWLock ) [private]
void Poco::RWLock::readLock ( ) [inline]

Destroys the Reader/Writer lock.

Definition at line 120 of file RWLock.h.

bool Poco::RWLock::tryReadLock ( ) [inline]

Acquires a read lock. If another thread currently holds a write lock, waits until the write lock is released.

Definition at line 126 of file RWLock.h.

bool Poco::RWLock::tryWriteLock ( ) [inline]

Acquires a write lock. If one or more other threads currently hold locks, waits until all locks are released. The results are undefined if the same thread already holds a read or write lock

Definition at line 138 of file RWLock.h.

void Poco::RWLock::unlock ( ) [inline]

Tries to acquire a write lock. Immediately returns true if successful, or false if one or more other threads currently hold locks. The result is undefined if the same thread already holds a read or write lock.

Definition at line 144 of file RWLock.h.

void Poco::RWLock::writeLock ( ) [inline]

Tries to acquire a read lock. Immediately returns true if successful, or false if another thread currently holds a write lock.

Definition at line 132 of file RWLock.h.


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


pluginlib
Author(s): Tully Foote and Eitan Marder-Eppstein
autogenerated on Sat Dec 28 2013 17:20:20