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

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

#include <ReadWriteMutex.h>

Public Member Functions

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

Detailed Description

template<class Mutex>
class mvlt::WriteLock< Mutex >

A class for blocking a stream for writing.

In the constructor, this class captures Mutex and blocks it for writing, 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

◆ WriteLock()

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

Constructor.

Lock thread to write

Parameters
[in]mtxmutex to capture and lock

◆ ~WriteLock()

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

Destructor.

Unlock captured mutex


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