TARAXA
ThreadSafeSet< Key > Class Template Reference

#include <util.hpp>

Public Member Functions

bool emplace (Key const &key)
 
std::size_t count (Key const &key) const
 
void clear ()
 
bool erase (const Key &key)
 
std::size_t size () const
 

Private Attributes

std::unordered_set< Key > set_
 
std::shared_mutex mtx_
 

Member Function Documentation

◆ clear()

template<class Key >
void ThreadSafeSet< Key >::clear ( )
inline

◆ count()

template<class Key >
std::size_t ThreadSafeSet< Key >::count ( Key const &  key) const
inline

◆ emplace()

template<class Key >
bool ThreadSafeSet< Key >::emplace ( Key const &  key)
inline

◆ erase()

template<class Key >
bool ThreadSafeSet< Key >::erase ( const Key &  key)
inline

◆ size()

template<class Key >
std::size_t ThreadSafeSet< Key >::size ( ) const
inline

Member Data Documentation

◆ mtx_

template<class Key >
std::shared_mutex ThreadSafeSet< Key >::mtx_
mutableprivate

◆ set_

template<class Key >
std::unordered_set<Key> ThreadSafeSet< Key >::set_
private

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