title: java 7 uuid bug?
body: <p>I believe I may have found a UUID multi-threading bug in Oracle Java7  Update 5 and I was wondering if anyone could confirm with an independent example. Basically what happens is if I call UUID.Random() concurrently (I'm using 64 threads), I get a collision quickly most of the time).</p>
  
  <p>However, If the UUID generator is warmed up by running a test beforehand that just tosses a bunch of UUIDs it seems to work fine. Here's a gist in scala:</p>
  
  <p><a href="https://gist.github.com/3318973" rel="noreferrer">https://gist.github.com/3318973</a></p>
  
  <p>Important to note that I'm inserting into a mutable Set that I'm synchronizing from 64 different threads. The main thread blocks waiting for the workers to finish and then checks that the set size is what it should be. Collisions are printed as they occur.</p>
  
  <p>thanks!
  Adam</p>