LinuxThreads replacement

David Schultz das at FreeBSD.ORG
Tue Jul 15 01:29:39 PDT 2003


On Tue, Jul 15, 2003, Terry Lambert wrote:
> > ps. Yes, the above was written tongue-in-cheek.  People who make broad
> > statements like Terry often makes deserve to have their statements
> > thrown back at them.  Threads, like any other tool used by programmers,
> > can be used for both good and evil purposes, depending on the ability
> > and experience of the programmer doing the work.
[...]
> Yes, this is somewhat mitigated by the fact that it's easier to write
> threads code than an FSA, such that a lesser coder is still able to
> be productive.  As a class, it's a tool I would lump in with things
> like "perl".

Actually, event-based programming is usually easier, since it does
not require synchronization.  A number of people, myself included,
think that threads are overused, and often used incorrectly.  But
as Nate pointed out, threads are useful for many purposes, the
most fundamental of which are SMP scalability and reduced latency.
Also, threads are simply the natural programming model for many
applications.  For instance, you wouldn't rewrite the FreeBSD
kernel to use one thread per processor with an event loop and
L4-style continuations, would you?


More information about the freebsd-threads mailing list