http://d.puremagic.com/issues/show_bug.cgi?id=2617





------- Comment #1 from 2kor...@gmail.com  2009-01-26 00:25 -------
(In reply to comment #0)
> The following code fails to assert.
> 
> import tango.core.Atomic;
> void main(){
>   int j;
>   foreach (i; 1..500_000){
>     atomicIncrement!(msync.raw, int)(j);
>     assert(j == (i%256));
>   }
> }
> 

Shouldn't that be:
assert(j == i); // ?

I have noted that Tango atomicIncrement increments least significant byte only,
too, and was wondering whether it is intended...


-- 

Reply via email to