|
Boost : |
Subject: Re: [boost] storing intrusive_ptr in atomic?!
From: Oliver Kowalke (oliver.kowalke_at_[hidden])
Date: 2013-10-25 09:10:24
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)' ;^)
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk