Re:Multi-threading is always the wrong design (2023)
by andy24 on Wednesday April 02, 2025 @06:24AM
(#43555284)
Or games. Or web servers. I think the author might have forgotten to suffix the title with “for the work I do”.
Re:Multi-threading is always the wrong design (2023)
by packetlost on Thursday April 03, 2025 @01:41PM
(#43573019)
Web servers are notoriously easy to implement with message passing / fork. Threading is a particularly bad model for that case.
Games on the other hand? Oh yeah, you definitely need threads for that.
It's important to note that "multithreading" specifically means shared-memory model of parallel processing. Games are more of an exception than the rule when it comes to being well suited to shared memory.
Re:Multi-threading is always the wrong design (2023)
by andy24 on Friday April 04, 2025 @01:59PM
(#43585783)
Isn’t Nginx multithreaded rather than multiprocess? I’m not an expert in web stuff but it’s always felt intuitively that worker threads map nocely into typical web server workloads.
Also, any UI app should basically be multithreaded to prevent interface hiccups.
Re:Multi-threading is always the wrong design (2023)
by packetlost on Friday April 04, 2025 @10:38PM
(#43590158)
No, nginx uses a fixed number of worker processes and communicates primarily through explicit shared memory and message passing.
Threading works ok, but there's rarely much shared state so the fork and pipe / she model wins cleaner and more secure.
As for UIs: maybe! I'm sure it depends, but this isn't an area I know a ton about
Re:Multi-threading is always the wrong design (2023)
by andy24 on Sunday April 06, 2025 @05:43AM
(#43600199)
Interesting perspective, I’ve never been thinking about this problem in terms of whether workers need shared memory space. Thank you!
Re:Multi-threading is always the wrong design (2023)
by wiz21c on Wednesday April 02, 2025 @06:23AM
(#43555275)
yeah, definitely. I do GPU coding at work and that's hell. Optimizing the memory saturation and cpu saturation is maddening and always comes with surprises.
(but when it works, it's so gratifying! the GPU go very very fast)
"it brings complexity very few developers understand"
Someone tell this guy about GPUs ...