Boost logo

Boost :

From: Greg Colvin (gcolvin_at_[hidden])
Date: 2000-08-21 13:17:07


My suggestions seem to be getting lost in a flurry of nitpicking
over the example code, so let me restate the idea.

Thread primitives are dangerous. It is very easy to write programs
that lock up, and very difficult to debug them. Therefore I do not
want, and will continue to resist, the inclusion of thread
primitives in Boost, unless they are shown to be truly necessary
for implementing some other part of Boost, and we provide higher
level facilities for most uses.

I believe the correct approach is to identify patterns of safe
usage and create facilities that enforce those patterns -- at
compile time if possible, at run time if not. I have been pushing
the "monitor" pattern in my examples. If that pattern is not
adequate for certain applications the best alternative is not to
revert to primitives, but to provide the new pattern(s) as a safe
facility.

I'm sorry if I seem hard nosed about this, but I have my reasons.
First, I have seen how much trouble the Java threading primitives
cause for programmers trying to use them, and have read the rather
devastating critiques of those primitives by experts like Brinch
Hansen and Hoare (e.g. "... designed by amateurs who were in over
their depth"). I don't want us to make the same mistakes. Second,
we have hopes that much of Boost will be suitable for the next
revision of the C++ standard library. To date, the committee has
been extremely wary of suggestions to add threading facilities, so
whatever is proposed must be good enough to overcome that wariness
and withstand the strong criticism to which the committee will
subject it.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk