Add ThreadPool::getThreadCount()
Without the previously removed THREADCOUNT constant, there was no way to query the ThreadCount from outside the class. This function provides this.
This commit is contained in:
parent
beb3eae6e2
commit
5c72ecb74b
1 changed files with 7 additions and 0 deletions
|
@ -172,6 +172,13 @@ public:
|
|||
return fnQueue.empty();
|
||||
}
|
||||
|
||||
/*!
|
||||
\brief Returns the ThreadCount that this class was created with.
|
||||
*/
|
||||
unsigned int getThreadCount() {
|
||||
return SIZE;
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<std::thread> threads;
|
||||
std::atomic_bool isAlive;
|
||||
|
|
Loading…
Reference in a new issue