Main Page   Namespace List   Class Hierarchy   Compound List   Namespace Members   Compound Members  

BiasedReadWriteLock Class Reference

#include <BiasedReadWriteLock.h>

Inheritance diagram for BiasedReadWriteLock:

ReadWriteLock NonCopyable List of all members.

Public Methods

 BiasedReadWriteLock ()
virtual ~BiasedReadWriteLock () throw ()
virtual LockablegetReadLock ()
virtual LockablegetWriteLock ()

Protected Methods

void beforeRead ()
bool beforeReadAttempt (unsigned long timeout)
void afterRead ()
void beforeWrite ()
bool beforeWriteAttempt (unsigned long timeout)
void afterWrite ()
bool allowReader ()
bool allowWriter ()

Friends

class ReadLock
class WriteLock

Detailed Description

Author:
Eric Crahen <crahen@cse.buffalo.edu>
Date:
<2002-06-19T08:38:39-0400>
Version:
2.2.7
A specialized ReadWriteLock that has a bias toward writers. It will prefer writers over readers when many threads are competing for this lock.

See also:
ReadWriteLock


Constructor & Destructor Documentation

BiasedReadWriteLock   [inline]
 

Create a fair or somewhat balanced ReadWriteLock

virtual ~BiasedReadWriteLock   throw () [inline, virtual]
 

Destroy this ReadWriteLock


Member Function Documentation

virtual Lockable& getReadLock   [inline, virtual]
 

Get a reference to the read lock

Returns :
Lockable& read lock

Implements ReadWriteLock.

virtual Lockable& getWriteLock   [inline, virtual]
 

Get a reference to the write lock

Returns :
Lockable& write lock

Implements ReadWriteLock.


The documentation for this class was generated from the following file:
Generated on Tue Aug 27 07:43:10 2002 for ZThread by doxygen1.2.17