title: classical producer consumer threading
body: <p>In the <a href="http://en.wikipedia.org/wiki/Producer-consumer_problem" rel="nofollow">Classical producer consumer problem</a>. producer sleeps when <code>itemCount == BUFFER_SIZE</code> amd wakes up again when it goes down. But once <code>itemCount</code> grows up, producer thread is put to sleep. how can it know that <code>itemCount</code> has gone down and it needs to <code>wakeup</code> ?</p>