From 5c72ecb74b98b041ae32f08c252f5b61fd5391ce Mon Sep 17 00:00:00 2001 From: Stephen Seo Date: Tue, 7 Sep 2021 20:18:41 +0900 Subject: [PATCH] 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. --- src/EC/ThreadPool.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/EC/ThreadPool.hpp b/src/EC/ThreadPool.hpp index 22da28e..d3808ec 100644 --- a/src/EC/ThreadPool.hpp +++ b/src/EC/ThreadPool.hpp @@ -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 threads; std::atomic_bool isAlive;