CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
Threading.hpp File Reference
#include "CeresEngine/Macros.hpp"
#include <mutex>
#include <shared_mutex>
#include <thread>
#include <condition_variable>

Go to the source code of this file.

Classes

struct  CeresEngine::NullLockable
 A fake lockable type that performs no locking. More...
 
class  CeresEngine::Lock< Mutexes >
 The class Lock is a mutex wrapper that provides a convenient RAII-style mechanism for owning one or more mutexes for the duration of a scoped block. More...
 
class  CeresEngine::UniqueLock< Mutex >
 The class UniqueLock is a general-purpose mutex ownership wrapper allowing deferred locking, time-constrained attempts at locking, recursive locking, transfer of lock ownership, and use with condition variables. More...
 
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. More...
 
struct  CeresEngine::Relocker< Lock >
 An object that temporarily unlocks a lock. More...
 
class  CeresEngine::LockedObject< T, Mutex >
 A helper class that wraps and protects a value from non-synchronized access. More...
 
class  CeresEngine::LockedObject< T, Mutex >::TemporaryLock< U >
 A helper class that acquires a temporary lock and overloads operator-> to allow access to the object. More...
 

Namespaces

namespace  CeresEngine
 

Concepts

concept  CeresEngine::CLockedObject
 A concept that checks if the type T is a LockedObject.
 

Typedefs

using CeresEngine::Thread = std::thread
 The class thread represents a single thread of execution.
 
using CeresEngine::Mutex = std::mutex
 The Mutex class is a synchronization primitive that can be used to protect shared data from being simultaneously accessed by multiple threads.
 
using CeresEngine::TimedMutex = std::timed_mutex
 The TimedMutex class is a synchronization primitive that can be used to protect shared data from being simultaneously accessed by multiple threads.
 
using CeresEngine::RecursiveMutex = std::recursive_mutex
 The RecursiveMutex class is a synchronization primitive that can be used to protect shared data from being simultaneously accessed by multiple threads.
 
using CeresEngine::RecursiveTimedMutex = std::recursive_timed_mutex
 The RecursiveTimedMutex class is a synchronization primitive that can be used to protect shared data from being simultaneously accessed by multiple threads.
 
using CeresEngine::SharedMutex = std::shared_mutex
 The SharedMutex class is a synchronization primitive that can be used to protect shared data from being simultaneously accessed by multiple threads.
 
using CeresEngine::SharedTimedMutex = std::shared_timed_mutex
 The SharedTimedMutex class is a synchronization primitive that can be used to protect shared data from being simultaneously accessed by multiple threads.
 
using CeresEngine::ConditionVariable = std::condition_variable
 The condition_variable class is a synchronization primitive that can be used to block a thread, or multiple threads at the same time, until another thread both modifies a shared variable (the condition), and notifies the condition_variable.
 

Functions

template<CLockedObject... Ts, typename Func >
decltype(autoCeresEngine::lock (Func &&func, Ts &... objects)
 
template<typename T , typename Mutex , typename Func >
decltype(autoCeresEngine::lock (LockedObject< T, Mutex > &object, Func &&func)
 Executes a function Func within a synchronized block.
 
template<typename T , typename Mutex , typename Func >
decltype(autoCeresEngine::lock (const LockedObject< T, Mutex > &object, Func &&func)
 Executes a function Func within a synchronized block.