Boost logo

Boost :

From: Kevlin Henney (kevlin_at_[hidden])
Date: 2000-08-31 05:51:33


In message <39AD8DD7.F163BB84_at_[hidden]>, Dietmar Kuehl
<dietmar_kuehl_at_[hidden]> writes
>Can you please outline where the other features are necessary?

Exchange can be used for thread-safe pointer swapping. This takes a
couple of exchanges, but at each stage the system is in a consistent
state. This can be used, for instance, to support assignment in the
reference counted const_string class I have been idly toying with.

>I assume it is a lost battle to bring up again that this stuff seems to
>be at
>a too low level of abstraction for now: I still haven't seen the high
>level
>entities which are implemented using these low-level features...

I genuinely don't understand the issue :-) The point is that high-level
entities are implemented in terms of lower-level ones, and lower-level
ones in terms of even lower-level ones, etc. But eventually you need
something that does the real work close to the metal: You cannot
maintain the same level of abstraction throughout an entire system. So,
as Greg pointed out, shared_ptr would use this, as would the
const_string I mentioned. Higher-level entities would in turn use these.
____________________________________________________________

  Kevlin Henney phone: +44 117 942 2990
  Curbralan Ltd mobile: +44 7801 073 508
  kevlin_at_[hidden] fax: +44 870 052 2289
____________________________________________________________


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