
25 Oct
2013
25 Oct
'13
1:10 p.m.
2013/10/25 Andrey Semashev <andrey.semashev@gmail.com>
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)' ;^)