# | Line 136 | Line 136 | public class Queue { | |
---|---|---|
136 | throw new InvalidQueueException("Requested queue "+queue+" does not exist"); | |
137 | } | |
138 | // block if the queue is empty | |
139 | < | if (((LinkedList) _lists.get(queue)).size() == 0) { |
140 | < | synchronized(((LinkedList) _lists.get(queue))) { |
139 | > | synchronized(((LinkedList) _lists.get(queue))) { |
140 | > | if (((LinkedList) _lists.get(queue)).size() == 0) { |
141 | try { ((LinkedList) _lists.get(queue)).wait(); } catch(Exception e) {} | |
142 | } | |
143 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |