BlockingQueue in Java – How to implement producer-consumer design using BlockingQueue?

Java 5 util.concurrent package provides a very useful class named “BlockingQueue” to implement producer-consumer design. In java 1.4 world developers used to use wait and notify mechanism to implement the same design. BlockingQueue class made code more readable and reduced the chances of bug in the code. In the below given example, we have a […]
Continue reading…