DioxusLabs / example-projects

Featured Dioxus projects on how to build clean user interfaces in Rust
498 stars 63 forks source link

Use background threads #7

Closed andrewdavidmackenzie closed 1 year ago

andrewdavidmackenzie commented 2 years ago

this PR is more to request feedback on how it should be done, rather than think this is better than the original.

Things I saw:

But mainly, it looked to me like the scan coroutine just received the state from the receiver, and didn't do a scan, so scan.start() didn't actually do a new scan.

I couldn't get it working using co-routines, so did the thread thing in the button on_click(), but I would like to know how a background/async task like that should be triggered from a UI Button...

jkelleyrtp commented 1 year ago

Thank you!