#include <thread_pool.hpp>
◆ thread_pool() [1/3]
| xnetwork::thread_pool::thread_pool |
( |
size_t |
num_threads = std::thread::hardware_concurrency() | ) |
|
|
inlineexplicit |
- Parameters
-
| num_threads | Number of worker threads. Defaults to hardware concurrency (min 1). |
◆ ~thread_pool()
| xnetwork::thread_pool::~thread_pool |
( |
| ) |
|
|
inline |
◆ thread_pool() [2/3]
◆ thread_pool() [3/3]
◆ enqueue()
| auto xnetwork::thread_pool::enqueue |
( |
F && |
task | ) |
-> std::future<std::invoke_result_t<std::decay_t<F>>> |
|
inline |
Enqueue a callable for execution on the thread pool.
- Template Parameters
-
| F | Callable type (invocable, returns T) |
- Parameters
-
- Returns
- std::future<T> holding the result (or exception)
◆ operator=() [1/2]
◆ operator=() [2/2]
The documentation for this class was generated from the following file: