From: Stephen Seo Date: Tue, 7 Sep 2021 11:18:41 +0000 (+0900) Subject: Add ThreadPool::getThreadCount() X-Git-Tag: 1.0~28 X-Git-Url: https://git.seodisparate.com/stephenseo/static/search/searchdata.js?a=commitdiff_plain;h=5c72ecb74b98b041ae32f08c252f5b61fd5391ce;p=EntityComponentMetaSystem 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. --- 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;