#include <thread_pool.h>
|  | 
|  | thread_pool (int nthreads=default_njobs) | 
|  | 
| int | get_nthreads () const | 
|  | 
| void | launch (std::function< void() > job) | 
|  | launch simply enqueues a job and calls notify_one. Such a job will run to it's completion and end silently - any communication of it's state has to be managed by the job itself. See multithread.h for code which takes care of managing the life cycle of a group of jobs by wrapping them in an additional outer function  More... 
 | 
|  | 
| void | launch (std::function< void() > job, int njobs) | 
|  | overload of launch invoking the payload on several worker threads  More... 
 | 
|  | 
|  | ~thread_pool () | 
|  | 
Definition at line 101 of file thread_pool.h.
 
◆ thread_pool()
  
  | 
        
          | vspline_threadpool::thread_pool::thread_pool | ( | int | nthreads = default_njobs | ) |  |  | inline | 
 
 
◆ ~thread_pool()
  
  | 
        
          | vspline_threadpool::thread_pool::~thread_pool | ( |  | ) |  |  | inline | 
 
 
◆ get_nthreads()
  
  | 
        
          | int vspline_threadpool::thread_pool::get_nthreads | ( |  | ) | const |  | inline | 
 
 
◆ launch() [1/2]
  
  | 
        
          | void vspline_threadpool::thread_pool::launch | ( | std::function< void() > | job | ) |  |  | inline | 
 
launch simply enqueues a job and calls notify_one. Such a job will run to it's completion and end silently - any communication of it's state has to be managed by the job itself. See multithread.h for code which takes care of managing the life cycle of a group of jobs by wrapping them in an additional outer function 
Definition at line 204 of file thread_pool.h.
 
 
◆ launch() [2/2]
  
  | 
        
          | void vspline_threadpool::thread_pool::launch | ( | std::function< void() > | job, |  
          |  |  | int | njobs |  
          |  | ) |  |  |  | inline | 
 
overload of launch invoking the payload on several worker threads 
Definition at line 216 of file thread_pool.h.
 
 
◆ task_cv
      
        
          | std::condition_variable vspline_threadpool::thread_pool::task_cv | 
      
 
 
◆ task_mutex
      
        
          | std::mutex vspline_threadpool::thread_pool::task_mutex | 
      
 
 
◆ task_queue
      
        
          | std::queue< std::function < void() > > vspline_threadpool::thread_pool::task_queue | 
      
 
 
The documentation for this class was generated from the following file: