Run system::information in a different thread

... since it seems it can block for a couple of seconds.
This commit is contained in:
Héctor Ramón Jiménez 2022-05-04 14:25:04 +02:00
parent e24f26c28f
commit f1ec0af507
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
3 changed files with 17 additions and 9 deletions

View file

@ -6,7 +6,7 @@ use iced_graphics::compositor;
/// Query for available system information.
pub fn fetch_information<Message>(
f: impl Fn(Information) -> Message + 'static,
f: impl Fn(Information) -> Message + Send + 'static,
) -> Command<Message> {
Command::single(command::Action::System(Action::QueryInformation(
Box::new(f),