A thread pool manages a group threads for a large number of tasks processing.
More...
A thread pool manages a group threads for a large number of tasks processing.
- Examples:
- audio_player.cpp, thread-pool.cpp, and threading.cpp.
Creates a group of threads.
nana::threads::pool::pool |
( |
pool && |
other | ) |
|
nana::threads::pool::~pool |
( |
| ) |
|
waits for the all running tasks till they are finished and skips all the queued tasks.
pool & nana::threads::pool::operator= |
( |
pool && |
other | ) |
|
template<typename Function >
void nana::threads::pool::push |
( |
const Function & |
f | ) |
|
|
inline |
void nana::threads::pool::signal |
( |
| ) |
|
Make a signal that will be triggered when the tasks which are pushed before it are finished.
- Examples:
- thread-pool.cpp.
void nana::threads::pool::wait_for_finished |
( |
| ) |
|
void nana::threads::pool::wait_for_signal |
( |
| ) |
|