Leave two threads for smooth operation of profiler.

This commit is contained in:
Bartosz Taudul 2019-10-29 22:53:03 +01:00
parent 3e19fbc2fb
commit 079e21ea43

View File

@ -4,6 +4,7 @@
#include <algorithm>
#if CPU_CAN_DO_THREADS
#include "enkiTS/TaskScheduler_c.h"
#include <thread>
#endif
#include <atomic>
@ -242,7 +243,7 @@ void InitializeTest()
ZoneScoped;
#if CPU_CAN_DO_THREADS
g_TS = enkiNewTaskScheduler();
enkiInitTaskScheduler(g_TS);
enkiInitTaskSchedulerNumThreads(g_TS, std::max<int>( 2, std::thread::hardware_concurrency() - 2));
#endif
}