2004/01/27 05:12:03
[org.ibex.core.git] / src / org / xwt / util / Queue.java
index 05a9073..7d74b9c 100644 (file)
@@ -70,16 +70,8 @@ public class Queue {
         <tt>block</tt> is true and the queue is empty. */
     public synchronized Object remove(boolean block) {
 
-        while (size == 0) {
-            if (!block) return null;
-            try {
-                wait();
-            } catch (InterruptedException e) {
-            } catch (Exception e) {
-                if (Log.on) Log.info(this, "exception in Queue.wait(); this should never happen");
-                if (Log.on) Log.info(this, e);
-            }
-        }
+                try { wait(); } catch (InterruptedException e) {  }
+        if (!block) return null;
         
         Object ret = vec[first];
         first++;