di 0.1.0
Loading...
Searching...
No Matches
di::sync::Synchronized< Value, Lock > Class Template Reference

#include <di/sync/synchronized.h>

Public Member Functions

 Synchronized ()=default
template<typename U>
requires (!concepts::SameAs<U, InPlace> && !concepts::RemoveCVRefSameAs<U, Synchronized> && concepts::ConstructibleFrom<Value, U>)
constexpr Synchronized (U &&value)
template<typename... Args>
requires (concepts::ConstructibleFrom<Value, Args...>)
constexpr Synchronized (InPlace, Args &&... args)
 Synchronized (Synchronized &&)=delete
template<concepts::Invocable< Value & > Fun>
constexpr auto with_lock (Fun &&function) -> meta::InvokeResult< Fun, Value & >
constexpr auto lock ()
constexpr auto get_assuming_no_concurrent_accesses () -> Value &
constexpr auto get_const_assuming_no_concurrent_mutations () const -> Value const &
constexpr auto read () const -> Value requires(concepts::CopyConstructible< Value >)
constexpr auto get_lock () -> Lock &

Constructor & Destructor Documentation

◆ Synchronized() [1/4]

template<typename Value, concepts::Lock Lock = DefaultLock>
di::sync::Synchronized< Value, Lock >::Synchronized ( )
default

◆ Synchronized() [2/4]

template<typename Value, concepts::Lock Lock = DefaultLock>
template<typename U>
requires (!concepts::SameAs<U, InPlace> && !concepts::RemoveCVRefSameAs<U, Synchronized> && concepts::ConstructibleFrom<Value, U>)
di::sync::Synchronized< Value, Lock >::Synchronized ( U && value)
inlineexplicitconstexpr

◆ Synchronized() [3/4]

template<typename Value, concepts::Lock Lock = DefaultLock>
template<typename... Args>
requires (concepts::ConstructibleFrom<Value, Args...>)
di::sync::Synchronized< Value, Lock >::Synchronized ( InPlace ,
Args &&... args )
inlineexplicitconstexpr

◆ Synchronized() [4/4]

template<typename Value, concepts::Lock Lock = DefaultLock>
di::sync::Synchronized< Value, Lock >::Synchronized ( Synchronized< Value, Lock > && )
delete

Member Function Documentation

◆ get_assuming_no_concurrent_accesses()

template<typename Value, concepts::Lock Lock = DefaultLock>
auto di::sync::Synchronized< Value, Lock >::get_assuming_no_concurrent_accesses ( ) ->Value &
inlineconstexpr

◆ get_const_assuming_no_concurrent_mutations()

template<typename Value, concepts::Lock Lock = DefaultLock>
auto di::sync::Synchronized< Value, Lock >::get_const_assuming_no_concurrent_mutations ( ) const->Valueconst &
inlineconstexpr

◆ get_lock()

template<typename Value, concepts::Lock Lock = DefaultLock>
auto di::sync::Synchronized< Value, Lock >::get_lock ( ) ->Lock &
inlineconstexpr

◆ lock()

template<typename Value, concepts::Lock Lock = DefaultLock>
auto di::sync::Synchronized< Value, Lock >::lock ( )
inlineconstexpr

◆ read()

template<typename Value, concepts::Lock Lock = DefaultLock>
auto di::sync::Synchronized< Value, Lock >::read ( ) const->Valuerequires(concepts::CopyConstructible< Value >)
inlineconstexpr

◆ with_lock()

template<typename Value, concepts::Lock Lock = DefaultLock>
template<concepts::Invocable< Value & > Fun>
auto di::sync::Synchronized< Value, Lock >::with_lock ( Fun && function) ->meta::InvokeResult< Fun, Value & >
inlineconstexpr

The documentation for this class was generated from the following file: