LinuxThreads replacement

Terry Lambert tlambert2 at mindspring.com
Mon Jul 14 11:00:11 PDT 2003


Petri Helenius wrote:
> > get up to speed with thread implementations. Is it just me, or
> > are threads just a complete evil, which very few people
> > understand correctly and are able to implement and/or use them
> > correctly?
> 
> Threads are harder to understand and debug. Once you get to think
> in threads it actually helps productivity and creates simpler programs
> because you can create a thread for a task instead of going trough
> dozens of condition statements every time you return from a select or
> similar. Other such advantages exist.

Threads are for people who can't write finite state automatons.


> Also, since future CPUs and systems are likely to have more parallel
> execution units, threaded programs are ready to take advantage
> of such beasts if your memory coherency protocol does not eat up
> your performance.

SMP scaling is an argument for threads.  It's also an argument for
processes.

-- Terry


More information about the freebsd-threads mailing list