title: How to share a list of objects for parallel processing in Java?
body: <p>I have a list of objects that has to be shared among multiple threads.</p>
  
  <p>For example, I have a 5 discrete objects and a pool of 20 threads. At first 5 of 20 threads will start working, leaving the other threads in WAIT state. 5 threads will utilize each of 5 objects at a same time. </p>
  
  <p>If any of the thread is completed it should release the object so that the 6th thread can start working.</p>
  
  <p>For parallel processing of threads I think I can use Executor pool. But how to share the list of objects among threads ?</p>