GREM 3.12.0
Game/Rendering Engine Modules for C++
Loading...
Searching...
No Matches
grem::UniqueLock< MutexType > Class Template Reference

#include <GREM/core/system/synchronization.hpp>

Public Types

using mutex_type = MutexType

Public Member Functions

 UniqueLock () noexcept=default
 UniqueLock (const UniqueLock &)=delete
GREM_ALWAYS_INLINE UniqueLock (UniqueLock &&other) noexcept
GREM_ALWAYS_INLINE UniqueLock (mutex_type &mutex)
GREM_ALWAYS_INLINE UniqueLock (mutex_type &mutex, DeferLock) noexcept
GREM_ALWAYS_INLINE UniqueLock (mutex_type &mutex, TryToLock)
GREM_ALWAYS_INLINE UniqueLock (mutex_type &mutex, AdoptLock)
template<typename Rep, typename Period>
GREM_ALWAYS_INLINE UniqueLock (mutex_type &mutex, const DurationBase< Rep, Period > &timeoutDuration)
GREM_ALWAYS_INLINE UniqueLock (mutex_type &mutex, const TimePoint &timeoutTime)
GREM_ALWAYS_INLINE ~UniqueLock ()
GREM_ALWAYS_INLINE UniqueLock & operator= (UniqueLock &&other)
UniqueLock & operator= (const UniqueLock &)=delete
GREM_ALWAYS_INLINE void lock ()
GREM_ALWAYS_INLINE bool try_lock ()
template<typename Rep, typename Period>
requires (requires(mutex_type m) { m.try_lock_for(timeoutDuration); })
GREM_ALWAYS_INLINE bool try_lock_for (const DurationBase< Rep, Period > &timeoutDuration)
GREM_ALWAYS_INLINE bool try_lock_until (TimePoint timeoutTime)
GREM_ALWAYS_INLINE void unlock ()
GREM_ALWAYS_INLINE void swap (UniqueLock &other) noexcept
GREM_ALWAYS_INLINE mutex_type * release () noexcept
GREM_ALWAYS_INLINE mutex_type * mutex () const noexcept
GREM_ALWAYS_INLINE bool owns_lock () const noexcept
GREM_ALWAYS_INLINE operator bool () const noexcept

Friends

GREM_ALWAYS_INLINE friend void swap (UniqueLock &a, UniqueLock &b) noexcept

Member Typedef Documentation

◆ mutex_type

template<typename MutexType>
using grem::UniqueLock< MutexType >::mutex_type = MutexType

Constructor & Destructor Documentation

◆ UniqueLock() [1/9]

template<typename MutexType>
grem::UniqueLock< MutexType >::UniqueLock ( )
defaultnoexcept

◆ UniqueLock() [2/9]

template<typename MutexType>
grem::UniqueLock< MutexType >::UniqueLock ( const UniqueLock< MutexType > & )
delete

◆ UniqueLock() [3/9]

template<typename MutexType>
GREM_ALWAYS_INLINE grem::UniqueLock< MutexType >::UniqueLock ( UniqueLock< MutexType > && other)
inlinenoexcept

◆ UniqueLock() [4/9]

template<typename MutexType>
GREM_ALWAYS_INLINE grem::UniqueLock< MutexType >::UniqueLock ( mutex_type & mutex)
inlineexplicit

◆ UniqueLock() [5/9]

template<typename MutexType>
GREM_ALWAYS_INLINE grem::UniqueLock< MutexType >::UniqueLock ( mutex_type & mutex,
DeferLock  )
inlinenoexcept

◆ UniqueLock() [6/9]

template<typename MutexType>
GREM_ALWAYS_INLINE grem::UniqueLock< MutexType >::UniqueLock ( mutex_type & mutex,
TryToLock  )
inline

◆ UniqueLock() [7/9]

template<typename MutexType>
GREM_ALWAYS_INLINE grem::UniqueLock< MutexType >::UniqueLock ( mutex_type & mutex,
AdoptLock  )
inline

◆ UniqueLock() [8/9]

template<typename MutexType>
template<typename Rep, typename Period>
GREM_ALWAYS_INLINE grem::UniqueLock< MutexType >::UniqueLock ( mutex_type & mutex,
const DurationBase< Rep, Period > & timeoutDuration )
inline

◆ UniqueLock() [9/9]

template<typename MutexType>
GREM_ALWAYS_INLINE grem::UniqueLock< MutexType >::UniqueLock ( mutex_type & mutex,
const TimePoint & timeoutTime )
inline

◆ ~UniqueLock()

template<typename MutexType>
GREM_ALWAYS_INLINE grem::UniqueLock< MutexType >::~UniqueLock ( )
inline

Member Function Documentation

◆ operator=() [1/2]

template<typename MutexType>
GREM_ALWAYS_INLINE UniqueLock & grem::UniqueLock< MutexType >::operator= ( UniqueLock< MutexType > && other)
inline

◆ operator=() [2/2]

template<typename MutexType>
UniqueLock & grem::UniqueLock< MutexType >::operator= ( const UniqueLock< MutexType > & )
delete

◆ lock()

template<typename MutexType>
GREM_ALWAYS_INLINE void grem::UniqueLock< MutexType >::lock ( )
inline

◆ try_lock()

template<typename MutexType>
GREM_ALWAYS_INLINE bool grem::UniqueLock< MutexType >::try_lock ( )
inlinenodiscard

◆ try_lock_for()

template<typename MutexType>
template<typename Rep, typename Period>
requires (requires(mutex_type m) { m.try_lock_for(timeoutDuration); })
GREM_ALWAYS_INLINE bool grem::UniqueLock< MutexType >::try_lock_for ( const DurationBase< Rep, Period > & timeoutDuration)
inlinenodiscard

◆ try_lock_until()

template<typename MutexType>
GREM_ALWAYS_INLINE bool grem::UniqueLock< MutexType >::try_lock_until ( TimePoint timeoutTime)
inlinenodiscard

◆ unlock()

template<typename MutexType>
GREM_ALWAYS_INLINE void grem::UniqueLock< MutexType >::unlock ( )
inline

◆ swap()

template<typename MutexType>
GREM_ALWAYS_INLINE void grem::UniqueLock< MutexType >::swap ( UniqueLock< MutexType > & other)
inlinenoexcept

◆ release()

template<typename MutexType>
GREM_ALWAYS_INLINE mutex_type * grem::UniqueLock< MutexType >::release ( )
inlinenoexcept

◆ mutex()

template<typename MutexType>
GREM_ALWAYS_INLINE mutex_type * grem::UniqueLock< MutexType >::mutex ( ) const
inlinenodiscardnoexcept

◆ owns_lock()

template<typename MutexType>
GREM_ALWAYS_INLINE bool grem::UniqueLock< MutexType >::owns_lock ( ) const
inlinenodiscardnoexcept

◆ operator bool()

template<typename MutexType>
GREM_ALWAYS_INLINE grem::UniqueLock< MutexType >::operator bool ( ) const
inlineexplicitnoexcept

◆ swap

template<typename MutexType>
GREM_ALWAYS_INLINE friend void swap ( UniqueLock< MutexType > & a,
UniqueLock< MutexType > & b )
friend

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