21template <
typename Class,
typename std::enable_if_t<std::is_
class_v<Class>,
bool> = true>
24 friend class detail::write_guard<
mutex, std::
mutex>;
25 friend class detail::write_guard<const mutex, std::mutex>;
30 using
lock_guard = detail::write_guard<mutex, std::mutex>;
45 mutable std::mutex mutex_;
A mutual exclusion primitive that can be used to protect shared data.
Definition mutex.hpp:22
auto lock() noexcept -> lock_guard
Locks the mutex, blocking until the lock is acquired.
Definition mutex.hpp:41
auto lock() const noexcept -> const_lock_guard
Definition mutex.hpp:42
Class value_type
Definition mutex.hpp:28
detail::write_guard< mutex, std::mutex > lock_guard
Definition mutex.hpp:30
detail::write_guard< const mutex, std::mutex > const_lock_guard
Definition mutex.hpp:31
Definition algorithm.hpp:12