scc  2022.4.0
SystemC components library
util::thread_pool Struct Reference

a simple thread pool More...

#include <thread_pool.h>

Public Member Functions

template<class F , class... Args>
auto enqueue (F &&f, Args &&... args) -> std::future< typename std::result_of< F(Args...)>::type >
 
void start (std::size_t N=1)
 
void abort ()
 
void cancel_pending ()
 
void finish ()
 

Public Attributes

std::mutex m
 
std::condition_variable v
 
std::deque< std::packaged_task< void()> > work
 
std::vector< std::future< void > > finished
 

Detailed Description

a simple thread pool

Definition at line 33 of file thread_pool.h.


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