title: How to handle InterruptedException of BlockingQueue?
body: <p>I have a code similar to this which is inside <code>run()</code> method of a <code>Runnable</code> and multiple instances of that <code>Runnable</code> get launched, </p>
  
  <pre><code>do{
          try{
              String contractNum=contractNums.take();
             }catch(InterruptedException e){
              logger.error(e.getMessage(), e);
          }
    }while(!("*".equals(contractNum)));
  </code></pre>
  
  <p>Where <code>contractNums</code> is a <code>BlockingQueue&lt;String&gt;</code> shared by multiple threads. There are separate <code>Runnables</code> putting elements to this queue. </p>
  
  <p>I am not sure about next steps after catching <code>InterruptedException</code>, should I terminate this thread by re throwing a <code>RuntimeException</code> ( so my <code>while</code> loop terminates ) or try to take next element from <code>contractNum queue</code> again and ignoring <code>InterruptedException</code>?</p>
  
  <p>I am not sure if <code>InterruptedException</code> to be treated as a fatal condition for thread to terminate or keep it in while loop. </p>
  
  <p>Please suggest. </p>