|
Boost : |
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. :)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk