Simple thread pool with built-in error handling.
More...
#include <thread_pool_with_errors.hpp>
Simple thread pool with built-in error handling.
Definition at line 308 of file thread_pool_with_errors.hpp.
◆ ThreadPoolWithErrors()
threadschedule::ThreadPoolWithErrors::ThreadPoolWithErrors |
( |
size_t | num_threads = std::thread::hardware_concurrency() | ) |
|
|
inlineexplicit |
◆ add_error_callback()
auto threadschedule::ThreadPoolWithErrors::add_error_callback |
( |
ErrorCallback | callback | ) |
-> size_t
|
|
inline |
◆ clear_error_callbacks()
void threadschedule::ThreadPoolWithErrors::clear_error_callbacks |
( |
| ) |
|
|
inline |
◆ configure_threads()
auto threadschedule::ThreadPoolWithErrors::configure_threads |
( |
std::string const & | name_prefix, |
|
|
SchedulingPolicy | policy = SchedulingPolicy::OTHER, |
|
|
ThreadPriority | priority = ThreadPriority::normal() ) -> bool
|
|
inline |
◆ distribute_across_cpus()
auto threadschedule::ThreadPoolWithErrors::distribute_across_cpus |
( |
| ) |
-> bool
|
|
inline |
◆ error_count()
auto threadschedule::ThreadPoolWithErrors::error_count |
( |
| ) |
const -> size_t
|
|
inlinenodiscard |
◆ get_statistics()
◆ pending_tasks()
auto threadschedule::ThreadPoolWithErrors::pending_tasks |
( |
| ) |
const -> size_t
|
|
inlinenodiscard |
◆ pool()
auto threadschedule::ThreadPoolWithErrors::pool |
( |
| ) |
-> ThreadPool&
|
|
inlinenodiscard |
◆ reset_error_count()
void threadschedule::ThreadPoolWithErrors::reset_error_count |
( |
| ) |
|
|
inline |
◆ set_affinity()
auto threadschedule::ThreadPoolWithErrors::set_affinity |
( |
ThreadAffinity const & | affinity | ) |
-> bool
|
|
inline |
◆ shutdown()
void threadschedule::ThreadPoolWithErrors::shutdown |
( |
| ) |
|
|
inline |
◆ size()
auto threadschedule::ThreadPoolWithErrors::size |
( |
| ) |
const -> size_t
|
|
inlinenodiscardnoexcept |
◆ submit()
template<typename F, typename... Args>
auto threadschedule::ThreadPoolWithErrors::submit |
( |
F && | f, |
|
|
Args &&... | args ) -> FutureWithErrorHandler<std::invoke_result_t<F, Args...>>
|
|
inline |
◆ submit_with_description()
template<typename F, typename... Args>
auto threadschedule::ThreadPoolWithErrors::submit_with_description |
( |
std::string const & | description, |
|
|
F && | f, |
|
|
Args &&... | args ) -> FutureWithErrorHandler<std::invoke_result_t<F, Args...>>
|
|
inline |
◆ wait_for_tasks()
void threadschedule::ThreadPoolWithErrors::wait_for_tasks |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file: