Comment Inspiration... (Score 5, Informative) 216
The compare-and-swap approach is backed up by academic research:
http://www.cl.cam.ac.uk/TechReports/UCAM-CL-TR-579.pdf
[Practical Lock Freedom]
A language that doesn't affect the way you think about programming is not worth knowing.