MVault 0.0.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
mvlt::ReadLock< Mutex > Class Template Reference

A class for blocking a stream for reading. More...

#include <ReadWriteMutex.h>

Public Member Functions

 ReadLock (Mutex &mtx)
 Constructor.
 
 ~ReadLock ()
 Destructor.
 

Detailed Description

template<class Mutex>
class mvlt::ReadLock< Mutex >

A class for blocking a stream for reading.

In the constructor, this class captures Mutex and blocks it for reading, and unlocks it in the destructor.

Template Parameters
<Mutex>a mutex that supports read and write lock operations
ReadWriteMutexa standard mutex that supports read and write lock operations
RecursiveReadWriteMutexa recursive mutex that supports read and write lock operations

Constructor & Destructor Documentation

◆ ReadLock()

template<class Mutex >
mvlt::ReadLock< Mutex >::ReadLock ( Mutex mtx)
inline

Constructor.

Lock thread to read

Parameters
[in]mtxmutex to capture and lock

◆ ~ReadLock()

template<class Mutex >
mvlt::ReadLock< Mutex >::~ReadLock ( )
inline

Destructor.

Unlock captured mutex


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