title: Condition - should unlock before await?
body: <p>Could you tell me if I should release lock before await on condition?</p>
  
  <pre><code>try {
      lock.lock();
      while (isNotEmpty()) {
          condition.await();
      }
  } finally {
      lock.unlock();
  }
  </code></pre>
  
  <p>Or </p>
  
  <pre><code>try {
      lock.lock();
      while (isNotEmpty()) {
          lock.unlock();
          condition.await();
      }
  } finally {
      lock.unlock();
  }
  </code></pre>