Boost logo

Boost :

From: Chris Thomasson (cristom_at_[hidden])
Date: 2006-12-02 07:13:22


[...]

>> Weak reference count modifications do not need to be
>> locked...
>
> That's good to know.
>
>> You don't need to use DWCAS either...
>
> Don't I need to do that for assignment and compare_and_set for the
> actual shared_ptr<>, since it's two words? (pointer to object and
> pointer to refcount.)

Well, if you use the current shared_ptr<> implementation, then the answer is
yes. I was referring to the fact that you can create shared_ptr<> out of a
completely different implementation that is "mostly" lock-free and 100%
compatible with plain-ol' CAS. I created and prototyped an experimental
example of such an algorithm. IMO, it proves that it is possible for a
single-word atomic refcounting implementation to exist without the support
from any sort of PDR algorithm.

> This is good feedback. Thank you for the help.

No problem.

:^)


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