title: nonblocking stack in java
body: <p>Can somebody help me in writing a <strong>non-blocking, lock free</strong> <code>stack</code> implementation. Is it there in the Sun java implementation? </p>
  
  <p>I was trying to write a thread safe <code>Stack</code> by putting a global lock on the whole stack data structure (it is costly) but it seems that it is possible to write a <strong>non-blocking, lock free</strong>  stack.</p>
  
  <p>An algorithm is called nonblocking if it is lock free and immune of deadlock.</p>