The Gaudi Framework  master (ff829712)
Loading...
Searching...
No Matches
Gaudi::cxx Namespace Reference

Classes

class  SynchronizedValue
 

Functions

template<typename Fun>
auto with_lock (Fun &&f)
 
template<typename ContainerOfSynced, typename Fun>
void for_each (ContainerOfSynced &c, Fun &&f)
 

Function Documentation

◆ for_each()

template<typename ContainerOfSynced, typename Fun>
void Gaudi::cxx::for_each ( ContainerOfSynced & c,
Fun && f )

Definition at line 98 of file SynchronizedValue.h.

98 {
99 std::for_each( begin( c ), end( c ), with_lock( std::forward<Fun>( f ) ) );
100 }
auto with_lock(Fun &&f)

◆ with_lock()

template<typename Fun>
auto Gaudi::cxx::with_lock ( Fun && f)

Definition at line 91 of file SynchronizedValue.h.

91 {
92 return [f = std::forward<Fun>( f )]( auto& p, auto&&... args ) -> decltype( auto ) {
93 return p.with_lock( f, std::forward<decltype( args )>( args )... );
94 };
95 }