Blocking and non-blocking queue
You asked for critique ....


Why are you trying to use an AtomicBoolean as a mutex?  Use a primitive lock, or a Lock if you need more sophisticated behavior.
(Almost) any time you use sleep in an algorithm, you are doing it the wrong way.  In this case, the "wrong way" is a direct consequence of point 1. above.
If you want good performance in a situation where you have multiple producers and consumers, you should avoid doing a notifyAll.  For instance if there are N consumers waiting, and a producer adds a queue entry, then all N consumers will be woken up.  Ideally, only one consumer should be woken.