title: What is ReentrantLock#tryLock(long,TimeUnit) doing when it tries to aquire the lock?
body: <p>What is the ReentrantLock#tryLock(long,TimeUnit) implementation doing when it tries to aquire a lock ? Assume Thread A acually owns the Lock of <code>myLock</code>, and Thread B call <code>myLock.tryLock(10,SECONDS)</code>, is Thread B sleeping or waiting ?</p>
  
  <p>In other words, was is the difference of this 2 implementations:</p>
  
  <p>1.</p>
  
  <pre><code>while (true)
     try {
       if (readLock.tryLock())
         return;
       MILLISECONDS.sleep(5);
     }catch (InterruptedException e) {}
  </code></pre>
  
  <p>2.</p>
  
  <pre><code> while (true)
     try {
       if (readLock.tryLock(5,MILLISECONDS))
         return;
     }catch (InterruptedException e) {}
  </code></pre>