this post was submitted on 17 Aug 2024
24 points (100.0% liked)

Rust

5989 readers
52 users here now

Welcome to the Rust community! This is a place to discuss about the Rust programming language.

Wormhole

!performance@programming.dev

Credits

  • The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)

founded 1 year ago
MODERATORS
 

I wrote a quick blog post about a pattern I discovered while building TUI applications in Rust. It's a bit unrefined, and I'm working on package to help make the pattern easier. Let me know what you think!

top 1 comments
sorted by: hot top controversial new old
[–] Deebster@programming.dev 1 points 2 months ago

I'm of the belief that spawning threads on demand is an anti-pattern; threads should spawn on program startup, and sleep until they have work to do.

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?