If you can read this text, it means you are not experiencing this website at its best. This website is designed for used with a standards-compliant browser.
Current version: 2.3.2
ZThreads
A platform-independent, multi-threading and synchronization library for C++
Home Documentation Downloads CVS Contact
BiasedReadWriteLock Class Reference

#include <BiasedReadWriteLock.h>

Inheritance diagram for BiasedReadWriteLock:
ReadWriteLock NonCopyable

Public Member Functions

 BiasedReadWriteLock ()
 
virtual ~BiasedReadWriteLock ()
 Destroy this ReadWriteLock.
 
virtual LockablegetReadLock ()
 
virtual LockablegetWriteLock ()
 
- Public Member Functions inherited from ReadWriteLock
 ReadWriteLock ()
 
virtual ~ReadWriteLock ()
 Destroy this ReadWriteLock.
 
virtual LockablegetReadLock ()=0
 
virtual LockablegetWriteLock ()=0
 

Protected Member Functions

void beforeRead ()
 
bool beforeReadAttempt (unsigned long timeout)
 
void afterRead ()
 
void beforeWrite ()
 
bool beforeWriteAttempt (unsigned long timeout)
 
void afterWrite ()
 
bool allowReader ()
 
bool allowWriter ()
 
- Protected Member Functions inherited from NonCopyable
 NonCopyable ()
 Create a NonCopyable object.
 
 ~NonCopyable ()
 Destroy a NonCopyable object.
 

Friends

class ReadLock
 
class WriteLock
 

Detailed Description

Author
Eric Crahen http://www.code-foo.com
Date
<2003-07-16T10:22:34-0400>
Version
2.2.7

A BiasedReadWriteLock has a bias toward writers. It will prefer read-write access over read-only access when many threads are contending for access to either Lockable this ReadWriteLock provides.

See also
ReadWriteLock

Constructor & Destructor Documentation

◆ BiasedReadWriteLock()

BiasedReadWriteLock ( )
inline

Create a BiasedReadWriteLock

Exceptions
Initialization_Exceptionthrown if resources could not be allocated for this object.

Member Function Documentation

◆ getReadLock()

virtual Lockable & getReadLock ( )
inlinevirtual

◆ getWriteLock()

virtual Lockable & getWriteLock ( )
inlinevirtual

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