libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE::cache::threading< Key, Val, Comp, Alloc >::multi< API, Mdl > Struct Template Reference

The multi-threaded trait. More...

#include <cache.hpp>

Public Types

typedef std::map< Key, Val, Comp, Alloc > assoc_colln_t
 Use a standard map as the basic associative collection. More...
 
typedef assoc_colln_t::value_type::second_type mapped_type
 
typedef private_::multi_or_sequential< Mdl > multi_or_sequential_chooser
 
typedef ppd::thread_pool< ppd::pool_traits::work_distribution_mode_t::one_thread_distributes<>, multi_or_sequential_chooser::infinite_size_type, ppd::pool_aspects< ppd::generic_traits::return_data::joinable, API, Mdl, ppd::pool_traits::normal_fifo, std::less > > flusher_pool_t
 A multi-threaded trait for executing work from which we do not need to get the results. More...
 
typedef ppd::thread_pool< ppd::pool_traits::work_distribution_mode_t::worker_threads_get_work< ppd::pool_traits::work_distribution_mode_t::queue_model_t::pool_owns_queue >, multi_or_sequential_chooser::fixed_size_type, ppd::pool_aspects< ppd::generic_traits::return_data::joinable, API, Mdl, ppd::pool_traits::normal_fifo > > populate_pool_t
 A multi-threaded trait for executing work from which we want to get the results. More...
 

Detailed Description

template<typename Key, typename Val, class Comp = std::less<Key>, class Alloc = std::allocator<Val>>
template<ppd::generic_traits::api_type API, typename Mdl>
struct jmmcg::LIBJMMCG_VER_NAMESPACE::cache::threading< Key, Val, Comp, Alloc >::multi< API, Mdl >

The multi-threaded trait.

Definition at line 87 of file cache.hpp.

Member Typedef Documentation

◆ assoc_colln_t

template<typename Key , typename Val , class Comp = std::less<Key>, class Alloc = std::allocator<Val>>
template<ppd::generic_traits::api_type API, typename Mdl >
typedef std::map<Key,Val,Comp,Alloc> jmmcg::LIBJMMCG_VER_NAMESPACE::cache::threading< Key, Val, Comp, Alloc >::multi< API, Mdl >::assoc_colln_t

Use a standard map as the basic associative collection.

An associative collection that supported locking on its methods would avoid the gross locks required in the cache itself.

Definition at line 92 of file cache.hpp.

◆ flusher_pool_t

template<typename Key , typename Val , class Comp = std::less<Key>, class Alloc = std::allocator<Val>>
template<ppd::generic_traits::api_type API, typename Mdl >
typedef ppd::thread_pool< ppd::pool_traits::work_distribution_mode_t::one_thread_distributes<>, multi_or_sequential_chooser::infinite_size_type, ppd::pool_aspects< ppd::generic_traits::return_data::joinable, API, Mdl, ppd::pool_traits::normal_fifo, std::less > > jmmcg::LIBJMMCG_VER_NAMESPACE::cache::threading< Key, Val, Comp, Alloc >::multi< API, Mdl >::flusher_pool_t

A multi-threaded trait for executing work from which we do not need to get the results.

Definition at line 107 of file cache.hpp.

◆ mapped_type

template<typename Key , typename Val , class Comp = std::less<Key>, class Alloc = std::allocator<Val>>
template<ppd::generic_traits::api_type API, typename Mdl >
typedef assoc_colln_t::value_type::second_type jmmcg::LIBJMMCG_VER_NAMESPACE::cache::threading< Key, Val, Comp, Alloc >::multi< API, Mdl >::mapped_type

Definition at line 93 of file cache.hpp.

◆ multi_or_sequential_chooser

template<typename Key , typename Val , class Comp = std::less<Key>, class Alloc = std::allocator<Val>>
template<ppd::generic_traits::api_type API, typename Mdl >
typedef private_::multi_or_sequential<Mdl> jmmcg::LIBJMMCG_VER_NAMESPACE::cache::threading< Key, Val, Comp, Alloc >::multi< API, Mdl >::multi_or_sequential_chooser

Definition at line 94 of file cache.hpp.

◆ populate_pool_t

A multi-threaded trait for executing work from which we want to get the results.

Note that this is a finite-sized thread pool.

Definition at line 122 of file cache.hpp.


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