diff options
author | Bartosz Taudul <wolf.pld@gmail.com> | 2019-10-30 00:53:03 +0300 |
---|---|---|
committer | Bartosz Taudul <wolf.pld@gmail.com> | 2019-10-30 00:53:03 +0300 |
commit | 079e21ea432c2867ab3d195bcc170ffbef1eb55c (patch) | |
tree | dfb1d85fe3ae489c804d80ea918a7eea14d91bee /examples | |
parent | 3e19fbc2fb52ca2443e41309c8261cb9d8ad4c35 (diff) |
Leave two threads for smooth operation of profiler.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/ToyPathTracer/Source/Test.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/examples/ToyPathTracer/Source/Test.cpp b/examples/ToyPathTracer/Source/Test.cpp index dadb2060..910e009c 100644 --- a/examples/ToyPathTracer/Source/Test.cpp +++ b/examples/ToyPathTracer/Source/Test.cpp @@ -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 } |