CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::SharedLock< Mutex > Class Template Referencefinal

The class SharedLock is a general-purpose shared mutex ownership wrapper allowing deferred locking, timed locking and transfer of lock ownership. More...

#include <CeresEngine/Foundation/Threading/Threading.hpp>

Inheritance diagram for CeresEngine::SharedLock< Mutex >:

Private Types

using super = std::shared_lock< Mutex >
 

Detailed Description

template<typename Mutex>
class CeresEngine::SharedLock< Mutex >

The class SharedLock is a general-purpose shared mutex ownership wrapper allowing deferred locking, timed locking and transfer of lock ownership.

Locking a SharedLock locks the associated shared mutex in shared mode (to lock it in exclusive mode, UniqueLock can be used).

The SharedLock class is movable, but not copyable – it meets the requirements of MoveConstructible and MoveAssignable but not of CopyConstructible or CopyAssignable.

In order to wait in a shared mutex in shared ownership mode, ConditionVariable can be used.

Template Parameters
Mutexthe type of the shared mutex to lock. The type must meet the SharedMutex requirements

Member Typedef Documentation

◆ super

template<typename Mutex >
using CeresEngine::SharedLock< Mutex >::super = std::shared_lock<Mutex>
private

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