2
0
Эх сурвалжийг харах

Reverted to the previous worker thread sleeping behaviour as on other systems no performance gain was observed.

Lasse Öörni 14 жил өмнө
parent
commit
39bbcd1b81

+ 1 - 3
Engine/Core/WorkQueue.cpp

@@ -180,9 +180,6 @@ void WorkQueue::ProcessItems(unsigned threadIndex)
         if (shutDown_)
             return;
         
-        if (queue_.Empty())
-            Time::Sleep(0);
-        
         queueMutex_.Acquire();
         if (!queue_.Empty())
         {
@@ -204,6 +201,7 @@ void WorkQueue::ProcessItems(unsigned threadIndex)
                 wasActive = false;
             }
             queueMutex_.Release();
+            Time::Sleep(0);
         }
     }
 }