#include <ThreadPool.hpp>
◆ ThreadPool()
CU_API castor::ThreadPool::ThreadPool |
( |
size_t | count | ) |
|
|
explicit |
Constructor, initialises the pool with given threads count.
- Parameters
-
[in] | count | The threads count. |
◆ ~ThreadPool()
CU_API castor::ThreadPool::~ThreadPool |
( |
| ) |
|
|
noexcept |
◆ getCount()
size_t castor::ThreadPool::getCount |
( |
| ) |
const |
|
inlinenoexcept |
- Returns
- The threads count.
◆ isEmpty()
CU_API bool castor::ThreadPool::isEmpty |
( |
| ) |
const |
- Returns
true
if all the threads are busy.
◆ isFull()
CU_API bool castor::ThreadPool::isFull |
( |
| ) |
const |
- Returns
true
if all the threads are idle.
◆ pushJob()
Feeds a worker thread with the given job.
- Parameters
-
◆ waitAll()
Waits for all the threads to finish their job.
- Parameters
-
[in] | timeout | The maximum time to wait. |
- Returns
true
if all threads have finished.
The documentation for this class was generated from the following file: