Wait in a loop

This commit is contained in:
gwenn 2018-05-04 18:07:11 +02:00
parent fee4bfcc86
commit b0e22fc372

View File

@ -30,7 +30,7 @@ impl UnlockNotification {
fn wait(&mut self) -> bool {
let mut fired = self.mutex.lock().unwrap();
if !*fired {
while !*fired {
fired = self.cond.wait(fired).unwrap();
}
*fired