title: How long a blocking queue will wait for an element to dequeue?
body: <p>I'm using a blocking queue implementaion in my program.I would like to konw how long the thread will wait for a element to dequeue.?
  My client thred polls fro response, my server thread offers message.
  My code is as follows;</p>
  
  <pre><code>private BlockingQueue&lt;Message&gt; applicationResponses=  new LinkedBlockingQueue&lt;Message&gt;();
  </code></pre>
  
  <p>client:</p>
  
  <pre><code>    Message response = applicationResponses.take();
  </code></pre>
  
  <p>server:</p>
  
  <pre><code>    applicationResponses.offer(message);
  </code></pre>
  
  <p>Will my client thread wait forever? i would like to configure that time..(eg: 1000ms)..is that possible?</p>