The Gaudi Framework  master (37c0b60a)
Gaudi::cxx Namespace Reference

Namespaces

 details
 

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 105 of file SynchronizedValue.h.

105  {
106  std::for_each( begin( c ), end( c ), with_lock( std::forward<Fun>( f ) ) );
107  }

◆ with_lock()

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

Definition at line 98 of file SynchronizedValue.h.

98  {
99  return [f = std::forward<Fun>( f )]( auto& p, auto&&... args ) -> decltype( auto ) {
100  return p.with_lock( f, std::forward<decltype( args )>( args )... );
101  };
102  }
std::for_each
T for_each(T... args)
gaudirun.c
c
Definition: gaudirun.py:525
Gaudi::Utils::begin
AttribStringParser::Iterator begin(const AttribStringParser &parser)
Definition: AttribStringParser.h:136
std::forward
T forward(T... args)
gaudirun.args
args
Definition: gaudirun.py:336
IOTest.end
end
Definition: IOTest.py:125
Gaudi::cxx::with_lock
auto with_lock(Fun &&f)
Definition: SynchronizedValue.h:98