[LCP]design issues
David Spencer
david.w.spencer at oracle.com
Wed Sep 3 00:43:01 UTC 2003
I would beg to differ...
If your program needs to do several things at the same time, and you
don't use threads, then you either have to do them serially, or you have
to find some way of incrementally performing the tasks, then doing a bit
of each one in a loop, which is what the OS does for you anyway with
threads. Using threads is a lot easier than writing all this manually,
believe me, I know; when I started Windows programming threads didn't
exist and you had to turn everything inside out so that it would work
together. Threads make all this much easier, much nicer, and
consequently much easier to debug. Manually splitting stuff out so that
you don't have to use threads is seriously butt fugly, even more so than Mo.
If your program doesn't need to do several things at once, then of
course threads are a waste of space.
Performing tasks incrementally in a loop also gives you zero performance
enhancement when you upgrade to a multiprocessing machine. With threads
you get an instant improvement for free because the OS just gives
different threads to different processors.
Dave.
Greg Black wrote:
>On 2003-09-02, devraj sanyal wrote:
>
>
>
>>For multi threaded systems this can be done easily [...]
>>
>>
>
>You're dreaming -- *nothing* can be done easily with threads;
>and most things can't be done successfully, if the standard of
>current threaded software is any guide.
>
>
>
More information about the linuxCprogramming
mailing list