antoyo / relm

Idiomatic, GTK+-based, GUI library, inspired by Elm, written in Rust
MIT License
2.43k stars 78 forks source link

Multithread example #235

Open grelltrier opened 4 years ago

grelltrier commented 4 years ago

I think this is a better example of multi-threading because the user can see the other thread changing the counter and the new thread not instantly finishing. I don't know how to write a test for this though

antoyo commented 4 years ago

Thanks for this PR!

Could you please post this as a separate example so that we'll have one multithread example using the #[widget] attribute and one without?

Can you try to write the test by taking as example the multithread tests? That is, using relm_observer_wait!(let Increment(value) = observer); a couple times and asserting the value.

grelltrier commented 4 years ago

I can try but it will take some time. I am a bit overwhelmed with work right not :S

micwoj92 commented 2 years ago

This branch has conflicts that must be resolved