# | Line 247 | Line 247 | public class Queue { | |
---|---|---|
247 | * | |
248 | * @return An integer to be passed to the get() method. | |
249 | */ | |
250 | < | public int getQueue() { |
250 | > | public synchronized int getQueue() { |
251 | int pos = -1; | |
252 | for(int i=0; i < _lists.size(); i++) { | |
253 | if(_lists.get(i) == null) { | |
# | Line 271 | Line 271 | public class Queue { | |
271 | * | |
272 | * @param queue The integer identifier for the queue, given by getQueue(). | |
273 | */ | |
274 | < | public void removeQueue(int queue) { |
274 | > | public synchronized void removeQueue(int queue) { |
275 | _lists.set(queue, null); | |
276 | } | |
277 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |