mirror of
https://github.com/isar/rusqlite.git
synced 2024-11-26 19:41:37 +08:00
Wait in a loop
This commit is contained in:
parent
fee4bfcc86
commit
b0e22fc372
@ -30,7 +30,7 @@ impl UnlockNotification {
|
|||||||
|
|
||||||
fn wait(&mut self) -> bool {
|
fn wait(&mut self) -> bool {
|
||||||
let mut fired = self.mutex.lock().unwrap();
|
let mut fired = self.mutex.lock().unwrap();
|
||||||
if !*fired {
|
while !*fired {
|
||||||
fired = self.cond.wait(fired).unwrap();
|
fired = self.cond.wait(fired).unwrap();
|
||||||
}
|
}
|
||||||
*fired
|
*fired
|
||||||
|
Loading…
Reference in New Issue
Block a user