From 32ffce04fc3415ef10d2913fc90806077602e87d Mon Sep 17 00:00:00 2001 From: Benoit Steiner Date: Thu, 21 Apr 2016 08:47:28 -0700 Subject: Use EIGEN_THREAD_YIELD instead of std::this_thread::yield to make the code more portable. --- unsupported/test/cxx11_runqueue.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'unsupported/test/cxx11_runqueue.cpp') diff --git a/unsupported/test/cxx11_runqueue.cpp b/unsupported/test/cxx11_runqueue.cpp index 4207824bf..6c99eb981 100644 --- a/unsupported/test/cxx11_runqueue.cpp +++ b/unsupported/test/cxx11_runqueue.cpp @@ -184,7 +184,7 @@ void test_stress_runqueue() sum += j; continue; } - std::this_thread::yield(); + EIGEN_THREAD_YIELD(); j--; } total += sum; @@ -194,7 +194,7 @@ void test_stress_runqueue() std::vector stolen; for (int j = 1; j < kEvents;) { if (q.PopBackHalf(&stolen) == 0) { - std::this_thread::yield(); + EIGEN_THREAD_YIELD(); continue; } while (stolen.size() && j < kEvents) { @@ -209,7 +209,7 @@ void test_stress_runqueue() int v = stolen.back(); stolen.pop_back(); VERIFY_IS_NOT_EQUAL(v, 0); - while ((v = q.PushBack(v)) != 0) std::this_thread::yield(); + while ((v = q.PushBack(v)) != 0) EIGEN_THREAD_YIELD(); } total -= sum; })); -- cgit v1.2.3