diff --git a/src/unlock_notify.rs b/src/unlock_notify.rs index 985958b..491815c 100644 --- a/src/unlock_notify.rs +++ b/src/unlock_notify.rs @@ -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