From 079e21ea432c2867ab3d195bcc170ffbef1eb55c Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Tue, 29 Oct 2019 22:53:03 +0100 Subject: [PATCH] Leave two threads for smooth operation of profiler. --- examples/ToyPathTracer/Source/Test.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 #if CPU_CAN_DO_THREADS #include "enkiTS/TaskScheduler_c.h" +#include #endif #include @@ -242,7 +243,7 @@ void InitializeTest() ZoneScoped; #if CPU_CAN_DO_THREADS g_TS = enkiNewTaskScheduler(); - enkiInitTaskScheduler(g_TS); + enkiInitTaskSchedulerNumThreads(g_TS, std::max( 2, std::thread::hardware_concurrency() - 2)); #endif }