6 ms·
FTFY: thousands of GREEN threads
by smilekzs 4y ago
FTFY: thousands of GREEN threads
- amelius 4y agoDoes it matter? The point is that Go has excellent throughput and latency, while using only a single concurrency model.
- jen20 4y agoYes, it does matter. It has excellent throughput and latency for certain classes of systems, while others are impossible to build. Rust may not impose this constraint while meeting its goals.
- amelius 4y agoYou can say the same about assembly language. Yet it is used only by a very narrow audience.
- hu3 4y agoSeems like Rust is better in every way right? I can't help but wonder why is it that Go is so much more popular when it comes to language of choice for networked and multi-threaded applications.
- stjohnswarts 4y agoBecause it's easy to learn and "good enough". Rust is not easy to learn.
- jen20 4y agoIt's not better in every way at all - it is more flexible. I regularly bounce between Go and Rust in different contexts.
- mcronce 4y agoI would not describe latency as "excellent" in Go, unless you're measuring average or p90.
- vips7L 4y agoWhat happens if you need to do computational work on a go routine? Isn’t that going to block the carrier thread and then murder throughput?
- IshKebab 4y agoYes, you have to manually insert yield points. Exactly the same as with every cooperative threading system, including Lunatic and Rust's native async/await. Kind of feels like we need user space preemptive threading somehow.
- vips7L 4y agoOr just the ability to use native os thread pools for that type of work.
- smasher164 4y agoGo has asynchronous preemption now using signals. Tight loops are preemptible.