summaryrefslogtreecommitdiff
path: root/Source/Core/Common/WorkQueueThread.h
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2023-02-05 17:20:00 +1300
committerScott Mansell <phiren@gmail.com>2023-02-05 17:20:00 +1300
commit2ff155f74280ea2fdbbeb0536f66b3b04a92930b (patch)
tree9d0d9c0a677990d3cea9402c28c33bcdbf65a331 /Source/Core/Common/WorkQueueThread.h
parent271ffde71d5ac2f7ecc2d5850358731eb0613c3c (diff)
Optimise cond_var predicate order
m_items.empty() is by far the most likely reason for a notification.
Diffstat (limited to 'Source/Core/Common/WorkQueueThread.h')
-rw-r--r--Source/Core/Common/WorkQueueThread.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/Core/Common/WorkQueueThread.h b/Source/Core/Common/WorkQueueThread.h
index f7eb06f82f..be3c3198d4 100644
--- a/Source/Core/Common/WorkQueueThread.h
+++ b/Source/Core/Common/WorkQueueThread.h
@@ -147,7 +147,7 @@ private:
return;
m_worker_cond_var.wait(
- lg, [&] { return m_shutdown || m_cancelling.load() || !m_items.empty(); });
+ lg, [&] { return !m_items.empty() || m_shutdown || m_cancelling.load(); });
}
T item{std::move(m_items.front())};
m_items.pop();