Note that blocking operations throw InterruptedException along with the resetting thread interruption flag. So even if blockingQueue.put() is throwing InterruptedException for the first time, second call will do the job. This loop can't last forever. |