$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] storing intrusive_ptr in atomic?!
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2013-10-25 09:15:22
On Friday 25 October 2013 15:10:24 Oliver Kowalke wrote:
> 2013/10/25 Andrey Semashev <andrey.semashev_at_[hidden]>
>
> > Actually, it can be much simpler:
> >
> > T* p = a[index].exchange(NULL);
> > if (expected)
> >
> > // The expected value was removed from the array
> >
> > else
> >
> > // The array element was removed by some other thread
>
> you mean 'if ( p)' ;^)
Yes, of course. :)