$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] storing intrusive_ptr in atomic?!
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2013-10-25 06:50:20
2013/10/25 Giovanni Piero Deretta <gpderetta_at_[hidden]>
> The details of the safety of putting an intrusive_ptr in an atomic are
> discussed elsethread, I just wanted to remind you here that, unless you
> rely on exotic deferred reclamation techniques, to safely concurrently
> update a shared pointer normally you need to manipulate both the pointer
> itself and the shared count.
>
> This means either a DCAS, transactional memory or a (spin) lock. As the
> former two are implemented by no or few mainstream architectures, you
> pretty much need a lock. That's the path taken by boost::shared_ptr for
> example.
>
the intention behind my question was an algorithm for work-stealing/sharing
using
atomic-ops.