Internal Interface Wrap
API reference
Loading...
Searching...
No Matches
Public Member Functions | Private Attributes | List of all members
PlatformSharedLock< SharedMutex > Class Template Reference

RAII shared (reader) lock guard for any shared mutex. More...

#include <PlatformMutex.h>

Public Member Functions

 PlatformSharedLock (SharedMutex &mutex, uint32_t timeout_ms=0) noexcept
 
 ~PlatformSharedLock () noexcept
 
 PlatformSharedLock (const PlatformSharedLock &)=delete
 
PlatformSharedLock & operator= (const PlatformSharedLock &)=delete
 
 PlatformSharedLock (PlatformSharedLock &&other) noexcept
 
PlatformSharedLock & operator= (PlatformSharedLock &&other) noexcept
 
bool IsLocked () const noexcept
 
void Unlock () noexcept
 

Private Attributes

SharedMutex * mutex_
 
bool locked_
 

Detailed Description

template<typename SharedMutex>
class PlatformSharedLock< SharedMutex >

RAII shared (reader) lock guard for any shared mutex.

Template Parameters
SharedMutexType providing lock_shared()/try_lock_shared_for()/unlock_shared().

Constructor & Destructor Documentation

◆ PlatformSharedLock() [1/3]

template<typename SharedMutex >
PlatformSharedLock< SharedMutex >::PlatformSharedLock ( SharedMutex &  mutex,
uint32_t  timeout_ms = 0 
)
inlineexplicitnoexcept

◆ ~PlatformSharedLock()

◆ PlatformSharedLock() [2/3]

◆ PlatformSharedLock() [3/3]

Member Function Documentation

◆ IsLocked()

template<typename SharedMutex >
bool PlatformSharedLock< SharedMutex >::IsLocked ( ) const
inlinenoexcept

◆ operator=() [1/2]

◆ operator=() [2/2]

◆ Unlock()

template<typename SharedMutex >
void PlatformSharedLock< SharedMutex >::Unlock ( )
inlinenoexcept

Member Data Documentation

◆ locked_

template<typename SharedMutex >
bool PlatformSharedLock< SharedMutex >::locked_
private

◆ mutex_


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