Moved to a BlockingQueue instead of using wait and notify