ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/ThreadLocalRandom.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/ThreadLocalRandom.java (file contents):
Revision 1.27 by jsr166, Fri May 30 16:12:06 2014 UTC vs.
Revision 1.28 by dl, Thu Jun 19 12:01:07 2014 UTC

# Line 1004 | Line 1004 | public class ThreadLocalRandom extends R
1004              r ^= r >>> 17;
1005              r ^= r << 5;
1006          }
1007 <        else {
1008 <            localInit();
1009 <            if ((r = (int)UNSAFE.getLong(t, SEED)) == 0)
1010 <                r = 1; // avoid zero
1011 <        }
1007 >        else if ((r = mix32(seeder.getAndAdd(SEEDER_INCREMENT))) == 0)
1008 >            r = 1; // avoid zero
1009          UNSAFE.putInt(t, SECONDARY, r);
1010          return r;
1011      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines