[concurrency-interest] propper way to use CAS ?
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Concurrency-interest