futures::thread_pool
Defined in header <futures/executor/thread_pool.hpp>
class thread_pool;
A thread pool with the specified number of threads.
Public Classes
Name | |
---|---|
class | executor_type A executor that sends tasks to the thread pool. |
Public Functions
Member Functions | Description |
---|---|
(constructor) | Construct a thread pool. (function) |
get_executor | (function) |
join | (function) |
Public Functions
function thread_pool
Defined in header <futures/executor/thread_pool.hpp>
(1)
thread_pool();
(2)
thread_pool(unsigned int threads);
(3)
thread_pool(thread_pool &) = delete;
(4)
thread_pool(thread_pool &&) = delete;
- Construct a thread pool.
- Construct a thread pool with specified number of threads.
- Thread pools cannot be copied.
- Thread pools cannot be moved.
Exception Safety
Basic exception guarantee.
function get_executor
Defined in header <futures/executor/thread_pool.hpp>
executor_type
get_executor();
Exception Safety
Basic exception guarantee.
function join
Defined in header <futures/executor/thread_pool.hpp>
void
join();
Exception Safety
Basic exception guarantee.
Updated on 2023-01-04