Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2008-02-27 08:08:08

Sorry for the belated response.

Jeffrey Yasskin:

> On Jan 18, 2008 10:34 AM, Peter Dimov <pdimov_at_[hidden]> wrote:

> > I (and many others) will be very, very interested in your
> > implementation,
> > doubly so if you implement it using the interface proposed in
> >
> >
> Thanks for the support! I currently plan to extrapolate from the
> design of atomic<T> from N2427 instead of adding operations to
> shared_ptr itself. The requirement that "A program is allowed to
> access the same shared_ptr instance concurrently from multiple threads
> if the access is done exclusively via the member functions in this
> section." implies that instances accessed through those three methods
> are logically a separate type from instances accessed through other
> methods.

There are use cases in which you really do want to access the same variable
in both atomic and non-atomic ways. Something like:

// use atomic accesses on px


// use non-atomic accesses on px, we're exclusive

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