From e0ce07aa7d7642fb6da35654256e0f7c7dd33a55 Mon Sep 17 00:00:00 2001 From: Weiyi Wang Date: Sat, 22 Sep 2018 00:32:19 -0400 Subject: [PATCH] common/thread: remove YieldCPU() simply use the standard library yield() --- src/common/thread.h | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/common/thread.h b/src/common/thread.h index 12a1c095cb..6cbdb96a3f 100644 --- a/src/common/thread.h +++ b/src/common/thread.h @@ -87,14 +87,6 @@ private: void SleepCurrentThread(int ms); void SwitchCurrentThread(); // On Linux, this is equal to sleep 1ms - -// Use this function during a spin-wait to make the current thread -// relax while another thread is working. This may be more efficient -// than using events because event functions use kernel calls. -inline void YieldCPU() { - std::this_thread::yield(); -} - void SetCurrentThreadName(const char* name); } // namespace Common