Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/wolfpld/tracy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBartosz Taudul <wolf.pld@gmail.com>2019-10-30 00:53:03 +0300
committerBartosz Taudul <wolf.pld@gmail.com>2019-10-30 00:53:03 +0300
commit079e21ea432c2867ab3d195bcc170ffbef1eb55c (patch)
treedfb1d85fe3ae489c804d80ea918a7eea14d91bee /examples
parent3e19fbc2fb52ca2443e41309c8261cb9d8ad4c35 (diff)
Leave two threads for smooth operation of profiler.
Diffstat (limited to 'examples')
-rw-r--r--examples/ToyPathTracer/Source/Test.cpp3
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
}