NGen
Loading...
Searching...
No Matches
multithreading::shared_cache< Key, T > Struct Template Reference

#include <multithreading.hpp>

+ Collaboration diagram for multithreading::shared_cache< Key, T >:

Public Member Functions

std::pair< cache_slot< T > &, bool > find_or_insert (Key const &key, std::optional< Key > const &eviction_floor)
 
std::set< Key > keys () const
 

Private Attributes

std::map< Key, cache_slot< T > > cache
 
std::shared_mutex mutex
 

Member Function Documentation

◆ find_or_insert()

template<typename Key , typename T >
auto multithreading::shared_cache< Key, T >::find_or_insert ( Key const & key,
std::optional< Key > const & eviction_floor )

◆ keys()

template<typename Key , typename T >
auto multithreading::shared_cache< Key, T >::keys ( ) const

Member Data Documentation

◆ cache

template<typename Key , typename T >
std::map<Key, cache_slot<T> > multithreading::shared_cache< Key, T >::cache
private

◆ mutex

template<typename Key , typename T >
std::shared_mutex multithreading::shared_cache< Key, T >::mutex
mutableprivate

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