The Gaudi Framework  v29r0 (ff2e7097)
boost::threadpool::static_size< Pool > Class Template Reference

SizePolicy which preserves the thread count. More...

#include <src/threadpool/boost/threadpool/size_policies.hpp>

Public Member Functions

 static_size (Pool volatile &pool)
 
bool resize (size_t const worker_count)
 
void worker_died_unexpectedly (size_t const new_worker_count)
 
void task_scheduled ()
 
void task_finished ()
 

Static Public Member Functions

static void init (Pool &pool, size_t const worker_count)
 

Private Attributes

reference_wrapper< Pool volatile > m_pool
 

Detailed Description

template<typename Pool>
class boost::threadpool::static_size< Pool >

SizePolicy which preserves the thread count.

Parameters
PoolThe pool's core type.

Definition at line 68 of file size_policies.hpp.

Constructor & Destructor Documentation

template<typename Pool >
boost::threadpool::static_size< Pool >::static_size ( Pool volatile &  pool)
inline

Definition at line 78 of file size_policies.hpp.

79  : m_pool(pool)
80  {}
reference_wrapper< Pool volatile > m_pool

Member Function Documentation

template<typename Pool >
static void boost::threadpool::static_size< Pool >::init ( Pool &  pool,
size_t const  worker_count 
)
inlinestatic

Definition at line 73 of file size_policies.hpp.

74  {
75  pool.resize(worker_count);
76  }
template<typename Pool >
bool boost::threadpool::static_size< Pool >::resize ( size_t const  worker_count)
inline

Definition at line 82 of file size_policies.hpp.

83  {
84  return m_pool.get().resize(worker_count);
85  }
reference_wrapper< Pool volatile > m_pool
template<typename Pool >
void boost::threadpool::static_size< Pool >::task_finished ( )
inline

Definition at line 94 of file size_policies.hpp.

94 {}
template<typename Pool >
void boost::threadpool::static_size< Pool >::task_scheduled ( )
inline

Definition at line 93 of file size_policies.hpp.

93 {}
template<typename Pool >
void boost::threadpool::static_size< Pool >::worker_died_unexpectedly ( size_t const  new_worker_count)
inline

Definition at line 87 of file size_policies.hpp.

88  {
89  m_pool.get().resize(new_worker_count + 1);
90  }
reference_wrapper< Pool volatile > m_pool

Member Data Documentation

template<typename Pool >
reference_wrapper<Pool volatile> boost::threadpool::static_size< Pool >::m_pool
private

Definition at line 70 of file size_policies.hpp.


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