mirror of
https://github.com/wolfpld/tracy.git
synced 2024-11-22 14:44:34 +00:00
Leave two threads for smooth operation of profiler.
This commit is contained in:
parent
3e19fbc2fb
commit
079e21ea43
@ -4,6 +4,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#if CPU_CAN_DO_THREADS
|
#if CPU_CAN_DO_THREADS
|
||||||
#include "enkiTS/TaskScheduler_c.h"
|
#include "enkiTS/TaskScheduler_c.h"
|
||||||
|
#include <thread>
|
||||||
#endif
|
#endif
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
|
||||||
@ -242,7 +243,7 @@ void InitializeTest()
|
|||||||
ZoneScoped;
|
ZoneScoped;
|
||||||
#if CPU_CAN_DO_THREADS
|
#if CPU_CAN_DO_THREADS
|
||||||
g_TS = enkiNewTaskScheduler();
|
g_TS = enkiNewTaskScheduler();
|
||||||
enkiInitTaskScheduler(g_TS);
|
enkiInitTaskSchedulerNumThreads(g_TS, std::max<int>( 2, std::thread::hardware_concurrency() - 2));
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user