producer-consumer pattern encapsulated by BlockingQueue