use a blocking deque instead of PriorityQueue
full test coverage of BlockingDeque
removed unnecessary yield