Talk:Producer-consumer problem

From Wikipedia, the free encyclopedia

I often use Thread.yield (that switches to another thread) and tryLock. Is this inefficient? Honnza (talk) 00:07, 8 April 2008 (UTC)

Um... why not use <= and >= instead of = in the wakeup checks [in the solution with race condition]?

What if the buffer size was 1? We would still be in a deadlock. Besides, calling wakeup everytime an item is produced or consumed is inefficient and ugly. --Jtluoto 11:43, 13 January 2007 (UTC)