#include <batmat/thread-pool.hpp>
Definition at line 16 of file thread-pool.hpp.
|
| void | work (std::stop_token stop, size_t i) |
◆ batmat::thread_pool::Signals
| struct batmat::thread_pool::Signals |
| Class Members |
|
mutex |
mtx |
|
|
condition_variable_any |
cv |
|
◆ thread_pool() [1/3]
| batmat::thread_pool::thread_pool |
( |
size_t | num_threads = std::thread::hardware_concurrency() | ) |
|
|
inlineexplicit |
◆ thread_pool() [2/3]
| batmat::thread_pool::thread_pool |
( |
const thread_pool & | | ) |
|
|
delete |
◆ thread_pool() [3/3]
| batmat::thread_pool::thread_pool |
( |
thread_pool && | | ) |
|
|
default |
◆ work()
| void batmat::thread_pool::work |
( |
std::stop_token | stop, |
|
|
size_t | i ) |
|
inlineprivate |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ schedule()
| void batmat::thread_pool::schedule |
( |
size_t | i, |
|
|
std::function< void()> | func ) |
|
inline |
◆ wait()
| void batmat::thread_pool::wait |
( |
size_t | i | ) |
|
|
inline |
◆ wait_all()
| void batmat::thread_pool::wait_all |
( |
| ) |
|
|
inline |
◆ sync_run_all()
template<class I = size_t, class F>
| void batmat::thread_pool::sync_run_all |
( |
F && | f | ) |
|
|
inline |
◆ sync_run_n()
template<class I = size_t, class F>
| void batmat::thread_pool::sync_run_n |
( |
I | n, |
|
|
F && | f ) |
|
inline |
◆ size()
| size_t batmat::thread_pool::size |
( |
| ) |
const |
|
inlinenodiscard |
◆ signals
| std::vector<Signals> batmat::thread_pool::signals |
|
private |
◆ funcs
| std::vector<std::function<void()> > batmat::thread_pool::funcs |
|
private |
◆ exceptions
| std::vector<std::exception_ptr> batmat::thread_pool::exceptions |
|
private |
◆ threads
| std::vector<std::jthread> batmat::thread_pool::threads |
|
private |
The documentation for this class was generated from the following file: