[concurrency-interest] Single writer multiple readers no barriers -- safe ?

vikas vikas.vksingh at gmail.com
Wed Jun 4 14:54:42 EDT 2014

>>On Fri, Nov 29, 2013 at 6:51 AM, Nitsan Wakart <[hidden email]> wrote:
>>From my experience, lazySet is indeed your best choice (but only a valid
choice for a single writer). You >>need a volatile read to match the HB
relationship otherwise the compiler is free to optimize the value you
>>read, so someone using your map in a loop may end up stuck if you don't do

Hi Nitsan, 
   Why you said lazySet is a valid choice for single writer. Can you give
any reference or example on what can go wrong with multiple writers. 

>> You hopefully meant StoreStore | LoadStore .  Otherwise we have a very
>> subtle but serious problem.  >>(See
>> *http://www.hpl.hp.com/personal/Hans_Boehm/c++mm/no_write_fences.html
>> *for a C++ discussion >>from a few years ago.) 

Hi Hans,
  The link you provided is no more valid. Can you please provide the fresh


View this message in context: http://jsr166-concurrency.10961.n7.nabble.com/Single-writer-multiple-readers-no-barriers-safe-tp10306p11048.html
Sent from the JSR166 Concurrency mailing list archive at Nabble.com.

More information about the Concurrency-interest mailing list