title: Trying to understand the mechanics of a synchronous queue
body: <p>I was trying to read the implementation of <a href="http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/SynchronousQueue.html" rel="nofollow">Synchronous Queue</a><br>
  It is not so straightforward for me. It seems to be using a linked list where each node is associated with a thread.<br>
  And the core part uses a spin loop waiting for tasks to be placed in the queue.<br>
  I was wondering why is a spin loop being used instead of something like <code>wait/notify</code>?<br>
  Now this way one of the cores is gone due to this constant spin loop, right?<br>
  I am trying to understand this point and get a rough understanding of the design of the Synchronous Queue  </p>
  
  <p><strong>UPDATE</strong><br>
  What is also troubling me is how the waiter threads start/stop. </p>