Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2000-06-06 18:28:01

From: "John Maddock" <John_Maddock_at_[hidden]>

> I'm going to shamelessly ape Dave Abraham's exception guarantees here (I
> hope you'll forgive me Dave!) - the idea is to present a coherent set of
> thread safety descriptions so that we can all talk a common language :-)

Imitation is the sincerest form of imitation ;)

Just a few points about this. I'm no concurrency guru, but I can say some
general things about systems of guarantees.

1. It might be better not to re-use the names of my guarantees (basic,
strong, no-throw), especially unless there is a clear parallel, or we risk
some confusion and dilution of power.

2. A system of distinctions is powerful in proportion to its simplicity. I
considered drawing finer distinctions than basic/strong/no-throw, (and you
can do it) but what you end up with turns out not to be very useful. I know
this is a qualitative remark, but the distinctions between some of your
levels of safety don't seem quite stark enough to me. It looks like level 1
is specifically formulated to deal with COW (I am referring to your specific
use of the phrase "not a copy of"). Let me try to be clear about what I'm
saying: level 1 objects, for example, can be used by a single thread in a
multithread environment so long as no other thread uses an object that was
copied from this object. This is a subtle and hard-to-control condition.
Sometimes it is better not to draw out special conditions under which a
construct is safe, but to simply label it unsafe.


Boost list run by bdawes at, gregod at, cpdaniel at, john at