From b0e22fc372d1cd6cdc443067547f92b1df16ab1b Mon Sep 17 00:00:00 2001 From: gwenn Date: Fri, 4 May 2018 18:07:11 +0200 Subject: [PATCH] Wait in a loop --- src/unlock_notify.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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