[cpp-threads] Failed compare-and-swap
Chris Thomasson
cristom at comcast.net
Mon Jul 30 03:16:27 BST 2007
----- Original Message -----
From: "Lawrence Crowl" <Lawrence at Crowl.org>
To: "C++ threads standardisation" <cpp-threads at decadentplace.org.uk>
Sent: Sunday, July 29, 2007 2:58 PM
Subject: [cpp-threads] Failed compare-and-swap
> Are the synchronization semantics of a failed compare-and-swap
> any different from those of a successful one?
They sure can be:
http://groups.google.com/group/comp.programming.threads/msg/b6a4eec6cbba625b
http://groups.google.com/group/comp.programming.threads/msg/8db5e8cdf03459d1
Its mostly an implementation detail. For instance, you could not know for
sure if you can depend on the return value of the InterlockedCompareExchange
in the failure case... However, Neill Clift from Microsoft says he would
consider this to be a bug. This can boil down to a QoI issue...
More information about the cpp-threads
mailing list