Use EIGEN_THREAD_YIELD instead of std::this_thread::yield to make the code more portable.
diff --git a/unsupported/test/cxx11_eventcount.cpp b/unsupported/test/cxx11_eventcount.cpp index 2f25033..f16cc6f 100644 --- a/unsupported/test/cxx11_eventcount.cpp +++ b/unsupported/test/cxx11_eventcount.cpp
@@ -95,7 +95,7 @@ ec.Notify(false); continue; } - std::this_thread::yield(); + EIGEN_THREAD_YIELD(); j--; } }));
diff --git a/unsupported/test/cxx11_runqueue.cpp b/unsupported/test/cxx11_runqueue.cpp index 4207824..6c99eb9 100644 --- a/unsupported/test/cxx11_runqueue.cpp +++ b/unsupported/test/cxx11_runqueue.cpp
@@ -184,7 +184,7 @@ sum += j; continue; } - std::this_thread::yield(); + EIGEN_THREAD_YIELD(); j--; } total += sum; @@ -194,7 +194,7 @@ std::vector<int> 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 @@ 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; }));