Clean up `waiter` correctly when the timer expires
This commit is contained in:
parent
2fe84663ab
commit
5fb8a9f7e5
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in New Issue