首页 > 其他 > 详细

cas

时间:2014-05-26 16:06:18      阅读:356      评论:0      收藏:0      [点我收藏+]

CAS,当oldVal与expected相同时,将oldVal更新为newVal,原子操作

ABA problem:

when a location is read twice, has the same value for both reads, and "value is same“ is used to indicate "nothing has changed". however, another thread can execute between the two reads and change the value, do other work, then change the value back.

为了解决ABA问题,DCAS,Double-width CAS等都被相应提出

Exceptional backoff

 

 

reader-writer problem:

cas,布布扣,bubuko.com

cas

原文:http://www.cnblogs.com/starfuxks/p/3746197.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!