|
| | Mutex (ProtectedDataType data) |
| | Construct a new Mutex object with the given data.
|
| template<template< typename... > typename LockType = std::lock_guard> |
| Lock< ProtectedDataType const, LockType, MutexType > | lock () const |
| | Lock the mutex and get a lock object allowing access to the protected data.
|
| template<template< typename... > typename LockType = std::lock_guard> |
| Lock< ProtectedDataType, LockType, MutexType > | lock () |
| | Lock the mutex and get a lock object allowing access to the protected data.
|
template<typename ProtectedDataType, typename MutexType = std::mutex>
class util::Mutex< ProtectedDataType, MutexType >
A container for data that is protected by a mutex. Inspired by Mutex in Rust.
- Template Parameters
-
| ProtectedDataType | data type to hold |
| MutexType | type of mutex |