libjmmcg  release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
jmmcg::LIBJMMCG_VER_NAMESPACE::ppd::pool_traits Namespace Reference

A namespace to hold various traits relating to selecting the specific specialisation of thread_pool they would like. More...

Namespaces

namespace  private_
 
namespace  work_distribution_mode_t
 Various models of work distribution.
 

Classes

struct  normal_fifo
 The signalled_work_queue_type within the thread_pool will obey strict FIFO semantics. More...
 
struct  normal_lifo
 The signalled_work_queue_type within the thread_pool will obey strict LIFO semantics. More...
 
struct  normal_lifo_lockfree
 The signalled_work_queue_type within the thread_pool will obey strict LIFO semantics. More...
 
struct  prioritised_queue
 The signalled_work_queue_type within the thread_pool will operate upon work in some user-defined partial order. More...
 

Enumerations

enum class  size_mode_t {
  sequential , fixed_size , time_average_size , tracks_to_max ,
  infinite
}
 Control the size of the thread pool in various ways. More...
 
enum class  priority_mode_t { normal , priority }
 Specifiy if the thread_pool can sort work by some form of priority, executing the highest first. More...
 
enum class  states { unsignalled , exit_requested , new_work_arrived }
 The states in which the signalled_work_queue_type can be. More...
 

Detailed Description

A namespace to hold various traits relating to selecting the specific specialisation of thread_pool they would like.

These parameters allow the users to choose a thread_pool that has the properties they would like. Note that not all combinations make sense, so will give compilation errors, as they are not implemented, and of the rest, some of those may not be implemented. Contact the author if you need a specific specialisation!

Enumeration Type Documentation

◆ priority_mode_t

Specifiy if the thread_pool can sort work by some form of priority, executing the highest first.

Enumerator
normal 

No priority, a strict fifo.

priority 

The work items should have some form of partial ordering specified upon them.

Definition at line 143 of file thread_params_traits.hpp.

◆ size_mode_t

Control the size of the thread pool in various ways.

Enumerator
sequential 

Specify a serial thread pool, i.e. no threading.

fixed_size 

Specify n threads to be in the pool.

time_average_size 

Allow some automated mechanism to control the pool size.

tracks_to_max 

Have a maximum of n threads, but less or zero according to outstanding work.

infinite 

Specify a situation where a thread is spawned per job, with no limits.

Definition at line 135 of file thread_params_traits.hpp.

◆ states

The states in which the signalled_work_queue_type can be.

Enumerator
unsignalled 
exit_requested 
new_work_arrived 

Definition at line 618 of file thread_pool_aspects.hpp.