Public Member Functions | |
| ThreadPool (size_t capacity) | |
| ~ThreadPool () | |
| size_t | size () const |
| size_t | capacity () const |
| void | start (Task &task) |
| ONIXS_CONFLATEDUDP_EXPORTED void | start (Task &, const ThreadAffinity &) |
| ONIXS_CONFLATEDUDP_EXPORTED void | joinAll () |
Definition at line 116 of file ThreadPool.h.
|
inlineexplicit |
Initializes the pool of the requested capacity.
Definition at line 136 of file ThreadPool.h.
|
inline |
Finalizes the instance.
Waits until all threads accomplish their tasks.
Definition at line 146 of file ThreadPool.h.
|
inline |
Maximal number of threads maintained by the given pool.
Definition at line 159 of file ThreadPool.h.
| ONIXS_CONFLATEDUDP_EXPORTED void joinAll | ( | ) |
Blocks until all threads accomplish their tasks.
|
inline |
Number of active threads currently busy executing user-defined tasks.
Definition at line 153 of file ThreadPool.h.
| ONIXS_CONFLATEDUDP_EXPORTED void start | ( | Task & | , |
| const ThreadAffinity & | ) |
Spawns the new thread executing the given task. Binds the spawned thread to the defined set of cores/processors.
Raises exception if the number of active threads exceeds the predefined capacity of the pool.
|
inline |
Spawns the new thread executing the given task.
Raises exception if the number of active threads exceeds the predefined capacity of the pool.
Definition at line 169 of file ThreadPool.h.