LDC optimized builds causing unexpected behaviour when sharing variable between threads
    Kagamin 
    spam at here.lot
       
    Wed Jun  1 15:31:40 UTC 2022
    
    
  
On Wednesday, 1 June 2022 at 13:35:45 UTC, Keivan Shah wrote:
> So to me it seemed like marking the variable as `shared` should 
> have made it accessible as well as it takes care of the memory 
> ordering.
No, `shared` is a low level primitive. If you want one size fits 
all concurrency, use mutex, synchronized statement or 
std.concurrency.
    
    
More information about the digitalmars-d-ldc
mailing list