#include <btu/common/threading.hpp>
template <typename GuardedData, basic_lockable MutexType>
synchronized class
Public types
- using mutex_type = MutexType
- using value_type = GuardedData
Constructors, destructors, conversion operators
- synchronized(synchronized const&) deleted
-
template <typename... Args>synchronized(Args && ... args) explicit
Public functions
-
template <typename F>auto apply(F const& func) → auto
- auto operator=(synchronized const&) → synchronized&=delete
- auto rlock() const → auto
-
auto try_rlock() const → std::
optional<update_ guard<GuardedData const, MutexType>> -
auto try_wlock() → std::
optional<update_ guard<GuardedData, MutexType>> - auto wlock()