Skip to content
Discussion options

You must be logged in to vote

The problem with the code you gave is that it doesn't seem to run the event loop in the main thread. You probably shouldn't call async_std::task::block_on in the main thread.
Instead, you can use slint::spawn_local https://docs.rs/slint/latest/slint/fn.spawn_local.html to run a future in the main event loop. But don't forget to call slint::run_event_loop after spawning your thread

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@maxenko
Comment options

Answer selected by maxenko
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants