Clean up waiter correctly when the timer expires

This commit is contained in:
Ruihan Li 2024-01-02 23:42:28 +08:00 committed by Tate, Hongliang Tian
parent 2fe84663ab
commit 5fb8a9f7e5

View File

@ -99,7 +99,8 @@ impl WaitQueue {
if let Some(ref timer_callback) = timer_callback
&& timer_callback.is_expired()
{
return None;
self.dequeue(&waiter);
return cond();
}
waiter.wait();