Browse Source

common/thread: remove YieldCPU()

simply use the standard library yield()
Weiyi Wang 7 năm trước cách đây
mục cha
commit
e0ce07aa7d
1 tập tin đã thay đổi với 0 bổ sung8 xóa
  1. 0 8
      src/common/thread.h

+ 0 - 8
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