title: Using LinkedBlockingQueue good enough for multi thread java program?
body: <p>I have a consumer and a producer that adds and deletes Item objects from the queue. If I use the <code>put()</code> and <code>take()</code> methods. Is there any thread safety issues I need to still cover? This is similar to the bounded buffer problem and I was just wondering if using the blocking queue instead replaces the need for semaphores or monitors. The Item object itself would probably need synchronization (setters but getters don't need lock), am I right? And lastly, I'm not quite sure how to test if it is thread safe since I can't simultaneously make both threads call the <code>take()</code> because to order of execution is underterministic. Any ideas? Thanks.</p>