What Use are Threads Outside of Parallel Problems on MultiCore Systesm?
Posted
by Robert S. Barnes
on Stack Overflow
See other posts from Stack Overflow
or by Robert S. Barnes
Published on 2009-12-23T12:08:46Z
Indexed on
2010/03/16
7:36 UTC
Read the original article
Hit count: 232
Threads make the design, implementation and debugging of a program significantly more difficult.
Yet many people seem to think that every task in a program that can be threaded should be threaded, even on a single core system.
I can understand threading something like an MPEG2 decoder that's going to run on a multicore cpu ( which I've done ), but what can justify the significant development costs threading entails when you're talking about a single core system or even a multicore system if your task doesn't gain significant performance from a parallel implementation?
Or more succinctly, what kinds of non-performance related problems justify threading?
Edit
Well I just ran across one instance that's not CPU limited but threads make a big difference:
TCP, HTTP and the Multi-Threading Sweet Spot
Multiple threads are pretty useful when trying to max out your bandwidth to another peer over a high latency network connection. Non-blocking I/O would use significantly less local CPU resources, but would be much more difficult to design and implement.
© Stack Overflow or respective owner