Try using a BlockingQueue