title: Need to semaphore.relase() if semaphore.acquire() gets InterruptedException?
body: <p>From the Java java.util.concurrent.Semaphore docs it wasn't quite clear to me what happens if semaphore.acquire() blocks the thread and later gets interrupted by an InterruptedException. Has the semaphore value been decreased and so is there a need to release the semaphore?</p>
  
  <p>Currently I am using code like this:</p>
  
  <pre><code>try {
    // use semaphore to limit number of parallel threads
    semaphore.acquire();
    doMyWork();
  }
  finally {
    semaphore.release();
  }
  </code></pre>
  
  <p>Or should I rather not call release() when an InterruptedException occurs during acquire() ?</p>