This commit is contained in:
watrabi
2025-09-18 17:55:52 -04:00
commit 977f1ff4b8
15030 changed files with 17324420 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
#include "CPUCount.h"
#if defined (_WIN32)
# include <thread>
#else
# include "rbx/SystemUtil.h"
#endif
unsigned int RbxTotalUsableCoreCount(unsigned int defaultValue)
{
#ifdef _WIN32
unsigned n = std::thread::hardware_concurrency();
return n ? n : defaultValue;
#else
return RBX::SystemUtil::getCPUCoreCount();
#endif
}