this post was submitted on 17 Aug 2024
24 points (100.0% liked)
Rust
6751 readers
45 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Hmm, I need to think on this to decide whether I agree. What's your reasoning for this opinion? Is it just based on lower latency, or is it more of an architectural/correctness thing?
Oh hi, I forgot to reply to this!
My reasoning was mostly "I read it somewhere when I started coding and then didn't do much with threads" to be honest. Not great reasoning there. But modeling the interactions between a user, UI thread, and work thread made it a lot easier to organize my code and create a good separation of concerns; the UI thread handles interface updates and dispatching events, and the worker thread works. Honestly that code organization was the biggest advantage I got out of doing things this way, and I wish I'd emphasized that more in the blog post.