thread pool class.
More...
#include <threadpool.hpp>
◆ ThreadPool() [1/3]
create thread pool.
- Parameters
-
| workers | number of worker threads. |
◆ ThreadPool() [2/3]
| join::ThreadPool::ThreadPool |
( |
const ThreadPool & | other | ) |
|
|
delete |
copy constructor.
- Parameters
-
| other | other object to copy. |
◆ ThreadPool() [3/3]
| join::ThreadPool::ThreadPool |
( |
ThreadPool && | other | ) |
|
|
delete |
move constructor.
- Parameters
-
| other | other object to move. |
◆ ~ThreadPool()
| ThreadPool::~ThreadPool |
( |
| ) |
|
|
noexcept |
◆ operator=() [1/2]
copy assignment.
- Parameters
-
| other | other object to copy. |
- Returns
- a reference to the current object.
◆ operator=() [2/2]
move assignment.
- Parameters
-
| other | other object to move. |
- Returns
- a reference to the current object.
◆ push()
template<class Function , class... Args>
| void join::ThreadPool::push |
( |
Function && | func, |
|
|
Args &&... | args ) |
|
inline |
push a job to the work queue.
- Parameters
-
| func | callable to execute. |
| args | arguments to pass to the callable. |
◆ size()
| size_t ThreadPool::size |
( |
| ) |
const |
|
noexcept |
◆ WorkerThread
friendship with worker thread.
The documentation for this class was generated from the following files: