Java ConcurrentHashMap implementation
<p>I was just looking at the source code of Java's ConcurrentHashMap and found this line of code: </p>

<pre><code>/*
 * The maximum number of times to tryLock in a prescan before possibly blocking on acquire in   
 * preparation for a locked segment operation. On multiprocessors, using a bounded number of  
 * retries maintains cache acquired while locating nodes.
 */
static final int MAX_SCAN_RETRIES =
              Runtime.getRuntime().availableProcessors() &gt; 1 ? 64 : 1
</code></pre>

<p>The <code>MAX_SCAN_RETRIES</code> is used in looking up entries while acquiring lock. My question is how is the number <code>64</code> determined for a multi-processor machine? Anybody know the theory behind the number <code>64</code>?</p>
