Refactor ThreadLocal when running on hardware with more cores than PLATFORM_THREADS_LIMIT
This commit is contained in:
@@ -58,7 +58,7 @@ ThreadPoolService ThreadPoolServiceInstance;
|
||||
bool ThreadPoolService::Init()
|
||||
{
|
||||
// Spawn threads
|
||||
const int32 numThreads = Math::Clamp<int32>(Platform::GetCPUInfo().ProcessorCoreCount - 1, 2, PLATFORM_THREADS_LIMIT);
|
||||
const int32 numThreads = Math::Clamp<int32>(Platform::GetCPUInfo().ProcessorCoreCount - 1, 2, PLATFORM_THREADS_LIMIT / 2);
|
||||
LOG(Info, "Spawning {0} Thread Pool workers", numThreads);
|
||||
for (int32 i = ThreadPoolImpl::Threads.Count(); i < numThreads; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user