1
0
mirror of https://github.com/wolfpld/tracy.git synced 2025-03-20 07:40:02 +08:00

Use _mm_pause() instead of std::this_thread::yield() if possible.

This commit is contained in:
Bartosz Taudul
2019-12-31 14:59:54 +01:00
parent 8b56386ccd
commit 3a460d3183
5 changed files with 36 additions and 4 deletions
+2 -1
View File
@@ -34,6 +34,7 @@
#include "TracyTaskDispatch.hpp"
#include "TracyVersion.hpp"
#include "TracyWorker.hpp"
#include "TracyYield.hpp"
#include "tracy_flat_hash_map.hpp"
@@ -1384,7 +1385,7 @@ Worker::Worker( FileRead& f, EventType::Type eventMask, bool bgTasks )
}
}
if( idx >= 0 ) break;
std::this_thread::yield();
YieldThread();
}
if( data[idx].bufsz < sz )