title: java volatile objects in non volatile objects
body: <pre><code>// structure is like this, but not exact formation.
  class queue
  {
      volatile List&lt;pieceOfWork&gt; worksWaiting;
  }
  
  List&lt;queue&gt; qs; //  pieceOfWork has only some primitive arrays and strings.
  </code></pre>
  
  <p>Is it safe to read/write(not destroy, not create) elements of "Qs" from N threads at the same time? </p>
  
  <p>"WorksWaiting" is meant to synchronize between controller thread(1 or 2) and a controlled thread (N) while N controlleds reading/writing to Queues concurrently. </p>
  
  <p>Deletion/creation of queue will be made of controller threads.</p>
  
  <p>Thanks you.</p>
  
  <pre><code> th read   th write 
  (cpu sse) (gpu opencl executor)
   ^         ^
   |         |
   W W W W W W  ....w&lt;--- controller thread adding new works to queue and
                                                    deleting finished ones.
                                                 also splits a work item if 
                                               it is not finished in short time.
  </code></pre>