Cpp Utilities 1.2.3
Classes | Typedefs
Memory Namespace Reference

Namespace for all classes, typedefs and functions of memory safety. See Memory Safety for more instrucion. More...

Classes

class  EnableSafeSharedFromThis
 A proxy class from std::enable_shared_from_this to provide same functionality for SafeSharedPtr. More...
 
class  RWSpinLock
 High-performance read-write-spinlock, see RWSpinLock.hpp for details. More...
 
class  SafeSharedPtr
 Wrapper to std::shared_ptr to provide thread-safety while operating the underlying pointer. More...
 
class  SafeWeakPtr
 Wrapper to std::weak_ptr to provide weak reference for SafeSharedPtr. More...
 

Typedefs

using shared_mutex_t = std::shared_mutex
 Defined to std::shared_mutex with C++17 or higher, otherwise defined to RWSpinLock. More...
 
using shared_lock_t = std::shared_lock< shared_mutex_t >
 Defined to std::shared_lock<std::shared_mutex> with C++17 or higher, otherwise defined to RWSpinLock::ReadHolder. More...
 
using unique_lock_t = std::unique_lock< shared_mutex_t >
 Defined to std::unique_lock<std::shared_mutex> with C++17 or higher, otherwise defined to RWSpinLock::WriteHolder. More...
 

Detailed Description

Namespace for all classes, typedefs and functions of memory safety. See Memory Safety for more instrucion.

Typedef Documentation

◆ shared_mutex_t

using Memory::shared_mutex_t = typedef std::shared_mutex

Defined to std::shared_mutex with C++17 or higher, otherwise defined to RWSpinLock.

◆ shared_lock_t

using Memory::shared_lock_t = typedef std::shared_lock<shared_mutex_t>

Defined to std::shared_lock<std::shared_mutex> with C++17 or higher, otherwise defined to RWSpinLock::ReadHolder.

◆ unique_lock_t

using Memory::unique_lock_t = typedef std::unique_lock<shared_mutex_t>

Defined to std::unique_lock<std::shared_mutex> with C++17 or higher, otherwise defined to RWSpinLock::WriteHolder.