title: Java dynamic list in while(true) loop
body: <p>I have a list with objects and I need to iterate thru the list forever while items are getting removed or getting added. This all should happen in a runnable thread. What I want is that the iterating never stops while still being able to add new objects to it, and remove the finished ones. </p>
  
  <ul>
  <li>I want to add new objects from outside from the while(true) thread.</li>
  <li>I want to remove items in the while(true) thread.</li>
  <li>It's like an FIFO but Dynamic. Or like an queue which never stops. </li>
  <li>If the list is empty, it has to wait for new objects. </li>
  </ul>
  
  <p>Is this possible in Java? </p>