BALL  1.4.79
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | List of all members
BALL::TReadLocker< ReadLockerType, ReadWriteLockType > Class Template Reference

#include <BALL/SYSTEM/mutex.h>

Inheritance diagram for BALL::TReadLocker< ReadLockerType, ReadWriteLockType >:
ReadLockerType

Public Member Functions

 TReadLocker (ReadWriteLockType *lock)
 

Detailed Description

template<class ReadLockerType, class ReadWriteLockType>
class BALL::TReadLocker< ReadLockerType, ReadWriteLockType >

This class provides a very thin wrapper around different mutex read-locker types. As default, BALL supports QReadLocker, but it can be easily extended to support the same functionality with classes from boost or Intel Thread Building Blocks.

A BALL-mutex read-locker needs to provide a constructor which is called with a pointer to a corresponding TReadWriteLock. Upon construction, the mutex is automatically locked for read, and is automatically unlocked when the mutex runs out of scope.

Definition at line 132 of file mutex.h.

Constructor & Destructor Documentation

template<class ReadLockerType , class ReadWriteLockType >
BALL::TReadLocker< ReadLockerType, ReadWriteLockType >::TReadLocker ( ReadWriteLockType lock)
inline

Definition at line 136 of file mutex.h.