semaphore: Invert priority order. (#3488)

* semaphore: Invert priority order.

* playgo: Lower logs for some spammed functions.
This commit is contained in:
squidbus
2025-08-30 19:24:58 -07:00
committed by GitHub
parent 31aa7539d3
commit 52d2c4ddc1
2 changed files with 6 additions and 6 deletions

View File

@@ -172,9 +172,9 @@ public:
wait_list.push_back(waiter);
return --wait_list.end();
}
// Find the first with priority less then us and insert right before it.
// Find the first with lower priority (greater number) than us and insert right before it.
auto it = wait_list.begin();
while (it != wait_list.end() && (*it)->priority > waiter->priority) {
while (it != wait_list.end() && (*it)->priority <= waiter->priority) {
++it;
}
return wait_list.insert(it, waiter);