Subject: Re: [boost] Atomic Shared Ptr
From: Peter Dimov (lists_at_[hidden])
Date: 2017-06-19 12:16:18
Olaf van der Spek wrote:
> On Sat, Jun 17, 2017 at 10:49 PM, Peter Dimov via Boost
> <boost_at_[hidden]> wrote:
> > I made it a bit more complex:
> Hi Peter,
> Wow, that was fast. Thanks!
You're welcome. :-)
> > The reason it was so simple was because it was using the already
> > existing atomic functions. And no, it's not lock-free. Lock-freedom
> > requires significantly more complexity (and a double-width CAS).
> Why not improve the existing functions and keep using those?
Since atomic_shared_ptr is a separate type, there's room for it for a
spinlock, which on balance is a bit better than using a separate spinlock
pool as the free functions do.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk