#include <ctpl.h>
|  | 
| std::condition_variable | cv | 
|  | 
| std::vector< std::shared_ptr< std::atomic< bool > > > | flags | 
|  | 
| std::atomic< bool > | isDone | 
|  | 
| std::atomic< bool > | isStop | 
|  | 
| std::mutex | mutex | 
|  | 
| std::atomic< int > | nWaiting | 
|  | 
| boost::lockfree::queue< std::function< void(int id)> * > | q | 
|  | 
| detail::Queue< std::function< void(int id)> * > | q | 
|  | 
| std::vector< std::unique_ptr< std::thread > > | threads | 
|  | 
Definition at line 48 of file ctpl.h.
 
◆ thread_pool() [1/8]
  
  | 
        
          | ctpl::thread_pool::thread_pool | ( |  | ) |  |  | inline | 
 
 
◆ thread_pool() [2/8]
◆ ~thread_pool() [1/2]
  
  | 
        
          | ctpl::thread_pool::~thread_pool | ( |  | ) |  |  | inline | 
 
 
◆ thread_pool() [3/8]
◆ thread_pool() [4/8]
◆ thread_pool() [5/8]
  
  | 
        
          | ctpl::thread_pool::thread_pool | ( |  | ) |  |  | inline | 
 
 
◆ thread_pool() [6/8]
  
  | 
        
          | ctpl::thread_pool::thread_pool | ( | int | nThreads | ) |  |  | inline | 
 
 
◆ ~thread_pool() [2/2]
  
  | 
        
          | ctpl::thread_pool::~thread_pool | ( |  | ) |  |  | inline | 
 
 
◆ thread_pool() [7/8]
◆ thread_pool() [8/8]
◆ clear_queue() [1/2]
  
  | 
        
          | void ctpl::thread_pool::clear_queue | ( |  | ) |  |  | inline | 
 
 
◆ clear_queue() [2/2]
  
  | 
        
          | void ctpl::thread_pool::clear_queue | ( |  | ) |  |  | inline | 
 
 
◆ get_thread() [1/2]
  
  | 
        
          | std::thread& ctpl::thread_pool::get_thread | ( | int | i | ) |  |  | inline | 
 
 
◆ get_thread() [2/2]
  
  | 
        
          | std::thread& ctpl::thread_pool::get_thread | ( | int | i | ) |  |  | inline | 
 
 
◆ init() [1/2]
  
  | 
        
          | void ctpl::thread_pool::init | ( |  | ) |  |  | inlineprivate | 
 
 
◆ init() [2/2]
  
  | 
        
          | void ctpl::thread_pool::init | ( |  | ) |  |  | inlineprivate | 
 
 
◆ n_idle() [1/2]
  
  | 
        
          | int ctpl::thread_pool::n_idle | ( |  | ) |  |  | inline | 
 
 
◆ n_idle() [2/2]
  
  | 
        
          | int ctpl::thread_pool::n_idle | ( |  | ) |  |  | inline | 
 
 
◆ operator=() [1/4]
◆ operator=() [2/4]
◆ operator=() [3/4]
◆ operator=() [4/4]
◆ pop() [1/2]
  
  | 
        
          | std::function<void(int)> ctpl::thread_pool::pop | ( |  | ) |  |  | inline | 
 
 
◆ pop() [2/2]
  
  | 
        
          | std::function<void(int)> ctpl::thread_pool::pop | ( |  | ) |  |  | inline | 
 
 
◆ push() [1/4]
template<typename F > 
  
  | 
        
          | auto ctpl::thread_pool::push | ( | F && | f | ) | -> std::future<decltype(f(0))> |  | inline | 
 
 
◆ push() [2/4]
template<typename F > 
  
  | 
        
          | auto ctpl::thread_pool::push | ( | F && | f | ) | -> std::future<decltype(f(0))> |  | inline | 
 
 
◆ push() [3/4]
template<typename F , typename... Rest> 
  
  | 
        
          | auto ctpl::thread_pool::push | ( | F && | f, |  
          |  |  | Rest &&... | rest |  
          |  | ) |  | -> std::future<decltype(f(0, rest...))> |  | inline | 
 
 
◆ push() [4/4]
template<typename F , typename... Rest> 
  
  | 
        
          | auto ctpl::thread_pool::push | ( | F && | f, |  
          |  |  | Rest &&... | rest |  
          |  | ) |  | -> std::future<decltype(f(0, rest...))> |  | inline | 
 
 
◆ resize() [1/2]
  
  | 
        
          | void ctpl::thread_pool::resize | ( | int | nThreads | ) |  |  | inline | 
 
 
◆ resize() [2/2]
  
  | 
        
          | void ctpl::thread_pool::resize | ( | int | nThreads | ) |  |  | inline | 
 
 
◆ set_thread() [1/2]
  
  | 
        
          | void ctpl::thread_pool::set_thread | ( | int | i | ) |  |  | inlineprivate | 
 
 
◆ set_thread() [2/2]
  
  | 
        
          | void ctpl::thread_pool::set_thread | ( | int | i | ) |  |  | inlineprivate | 
 
 
◆ size() [1/2]
  
  | 
        
          | int ctpl::thread_pool::size | ( |  | ) |  |  | inline | 
 
 
◆ size() [2/2]
  
  | 
        
          | int ctpl::thread_pool::size | ( |  | ) |  |  | inline | 
 
 
◆ stop() [1/2]
  
  | 
        
          | void ctpl::thread_pool::stop | ( | bool | isWait = false | ) |  |  | inline | 
 
 
◆ stop() [2/2]
  
  | 
        
          | void ctpl::thread_pool::stop | ( | bool | isWait = false | ) |  |  | inline | 
 
 
◆ cv
  
  | 
        
          | std::condition_variable ctpl::thread_pool::cv |  | private | 
 
 
◆ flags
  
  | 
        
          | std::vector< std::shared_ptr< std::atomic< bool > > > ctpl::thread_pool::flags |  | private | 
 
 
◆ isDone
  
  | 
        
          | std::atomic< bool > ctpl::thread_pool::isDone |  | private | 
 
 
◆ isStop
  
  | 
        
          | std::atomic< bool > ctpl::thread_pool::isStop |  | private | 
 
 
◆ mutex
  
  | 
        
          | std::mutex ctpl::thread_pool::mutex |  | private | 
 
 
◆ nWaiting
  
  | 
        
          | std::atomic< int > ctpl::thread_pool::nWaiting |  | private | 
 
 
◆ q [1/2]
  
  | 
        
          | boost::lockfree::queue<std::function<void(int id)> *> ctpl::thread_pool::q |  | mutableprivate | 
 
 
◆ q [2/2]
  
  | 
        
          | detail::Queue<std::function<void(int id)> *> ctpl::thread_pool::q |  | private | 
 
 
◆ threads
  
  | 
        
          | std::vector< std::unique_ptr< std::thread > > ctpl::thread_pool::threads |  | private | 
 
 
The documentation for this class was generated from the following files: