Run system::information in a different thread
... since it seems it can block for a couple of seconds.
This commit is contained in:
parent
e24f26c28f
commit
f1ec0af507
3 changed files with 17 additions and 9 deletions
|
|
@ -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),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue