Sleep for only one second if the gtk sender can't be found #70
|
@ -110,8 +110,10 @@ pub fn main() {
|
||||||
|
|
||||||
if let Some(ref gtk_tx) = *core.tx.read().unwrap() {
|
if let Some(ref gtk_tx) = *core.tx.read().unwrap() {
|
||||||
let _ = gtk_tx.send(Message::Refresh(state.clone()));
|
let _ = gtk_tx.send(Message::Refresh(state.clone()));
|
||||||
|
std::thread::sleep(std::time::Duration::from_secs(60));
|
||||||
|
} else {
|
||||||
|
std::thread::sleep(std::time::Duration::from_secs(1));
|
||||||
}
|
}
|
||||||
std::thread::sleep(std::time::Duration::from_secs(60));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -134,8 +136,6 @@ pub fn main() {
|
||||||
Continue(true)
|
Continue(true)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
std::thread::spawn(move || {});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
let args: Vec<String> = env::args().collect();
|
let args: Vec<String> = env::args().collect();
|
||||||
|
|
Loading…
Reference in New Issue