semaphore: Fix returned iterator from AddWaiter (#1614)

This commit is contained in:
squidbus 2024-11-28 15:42:39 -08:00 committed by GitHub
parent fb0da5dca6
commit abd4261962

View file

@ -165,8 +165,7 @@ public:
while (it != wait_list.end() && (*it)->priority > waiter->priority) {
++it;
}
wait_list.insert(it, waiter);
return it;
return wait_list.insert(it, waiter);
}
WaitList wait_list;