changes made after tupshins reconstruction
[org.ibex.core.git] / src / org / xwt / util / Queue.java
index eb36a4d..8da10d4 100644 (file)
@@ -71,13 +71,10 @@ public class Queue {
     public synchronized Object remove(boolean block) {
 
         while (size == 0 && block) {
-            try {
-                wait();
-            } catch (InterruptedException e) {
-            }
+            try { wait(); } catch (InterruptedException e) { }
         }
         
-        if (!block) return null;
+        if (!block && size == 0) return null;
         Object ret = vec[first];
         first++;
         size--;