#include <src/thread_pool.h>
|
| | ThreadPool (int threads) |
| template<class Function, class... Args> |
| auto | push (Function &&newTask, Args &&...args) |
| void | pushDelayed (std::pair< __time_point, __task > &&task) |
| template<class Function, class X, class Y, class... Args> |
| auto | pushDelayed (Function &&newTask, std::chrono::duration< X, Y > duration, Args &&...args) |
| void | start (int threads) |
| void | stop () |
| void | join () |
| void | _main () |
| | TaskPool (TaskPool &&other) noexcept |
| TaskPool & | operator= (TaskPool &&other) noexcept |
| template<class Function, class... Args> |
| auto | push (Function &&newTask, Args &&...args) |
| void | pushDelayed (std::pair< __time_point, __task > &&task) |
| template<class Function, class X, class Y, class... Args> |
| auto | pushDelayed (Function &&newTask, std::chrono::duration< X, Y > duration, Args &&...args) |
| template<class X, class Y> |
| void | delay (task_id_t task_id, std::chrono::duration< X, Y > duration) |
| bool | cancel (task_id_t task_id) |
| std::optional< std::pair< __time_point, __task > > | pop (task_id_t task_id) |
| std::optional< __task > | pop () |
| bool | ready () |
| std::optional< __time_point > | next () |
Allow threads to execute unhindered while keeping full control over the threads.
Definition at line 17 of file thread_pool.h.
◆ __task
| typedef TaskPool::__task thread_pool_util::ThreadPool::__task |
◆ ThreadPool() [1/2]
| thread_pool_util::ThreadPool::ThreadPool |
( |
| ) |
|
|
inline |
◆ ThreadPool() [2/2]
| thread_pool_util::ThreadPool::ThreadPool |
( |
int | threads | ) |
|
|
inlineexplicit |
◆ ~ThreadPool()
| thread_pool_util::ThreadPool::~ThreadPool |
( |
| ) |
|
|
inlinenoexcept |
◆ _main()
| void thread_pool_util::ThreadPool::_main |
( |
| ) |
|
|
inline |
◆ join()
| void thread_pool_util::ThreadPool::join |
( |
| ) |
|
|
inline |
◆ push()
template<class Function, class... Args>
| auto thread_pool_util::ThreadPool::push |
( |
Function && | newTask, |
|
|
Args &&... | args ) |
|
inline |
◆ pushDelayed() [1/2]
template<class Function, class X, class Y, class... Args>
| auto thread_pool_util::ThreadPool::pushDelayed |
( |
Function && | newTask, |
|
|
std::chrono::duration< X, Y > | duration, |
|
|
Args &&... | args ) |
|
inline |
◆ pushDelayed() [2/2]
| void thread_pool_util::ThreadPool::pushDelayed |
( |
std::pair< __time_point, __task > && | task | ) |
|
|
inline |
◆ start()
| void thread_pool_util::ThreadPool::start |
( |
int | threads | ) |
|
|
inline |
◆ stop()
| void thread_pool_util::ThreadPool::stop |
( |
| ) |
|
|
inline |
The documentation for this class was generated from the following file: