[concurrency-interest] propper way to use CAS ?

Yechiel Feffer yechielf at gigaspaces.com
Sun Oct 9 08:30:54 EDT 2005

in many concurrent classes when compare-and-set (cas) is used- it is an
endless loop of competing threads trying to fight over an object (,say, a
queue's tail in order to connect a new element (reference)) .
Wouldn't it be benefitial to perform a thread.Yield() after N
(pre-configured) unsuccessful CAS retries ? wouldnt it give better overall
performance ?

Yechiel Fefer     
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/attachments/20051009/7ef21908/attachment.htm

More information about the Concurrency-interest mailing list