[cpp-threads] Some concerns with N2324

Bronek Kozicki brok at spamcop.net
Mon Jul 16 19:23:47 BST 2007


Lawrence Crowl wrote:
> The swap operation is essentially an assignment, but returning the
> old value rather than the new value.  I am amenable to a change
> in name, but the "swap" name follows from "compare and swap"
> and practice in the concurrency community.
> 
> Admittedly, it is a poor match to std::swap.


I suggest this to be called atomic_cas (or similar), to avoid confusion


B.



More information about the cpp-threads mailing list