Classes | Public Member Functions | Private Attributes | List of all members
PLMD::Tools::CriticalSectionWithKey< Key > Class Template Reference

Utility to create named critical sections Key should be usable in a std::map. More...

#include <Tools.h>

Classes

class  Handler
 

Public Member Functions

void start (const Key &key)
 
Handler startStop (const Key &key)
 
void stop (const Key &key)
 

Private Attributes

std::map< Key, int > in_progress
 
std::mutex mutex
 
std::condition_variable notify
 

Detailed Description

template<class Key>
class PLMD::Tools::CriticalSectionWithKey< Key >

Utility to create named critical sections Key should be usable in a std::map.

Member Function Documentation

◆ start()

template<class Key >
void PLMD::Tools::CriticalSectionWithKey< Key >::start ( const Key &  key)
inline

◆ startStop()

template<class Key >
Handler PLMD::Tools::CriticalSectionWithKey< Key >::startStop ( const Key &  key)
inline

◆ stop()

template<class Key >
void PLMD::Tools::CriticalSectionWithKey< Key >::stop ( const Key &  key)
inline

Member Data Documentation

◆ in_progress

template<class Key >
std::map<Key, int> PLMD::Tools::CriticalSectionWithKey< Key >::in_progress
private

◆ mutex

template<class Key >
std::mutex PLMD::Tools::CriticalSectionWithKey< Key >::mutex
private

◆ notify

template<class Key >
std::condition_variable PLMD::Tools::CriticalSectionWithKey< Key >::notify
private

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