X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Futil%2FQueue.java;fp=src%2Forg%2Fxwt%2Futil%2FQueue.java;h=7d74b9c772d1681dee0bf8b17525761d6cf3e432;hb=2b2b24b52422cf388ef6170090487eb60ec06a4e;hp=05a9073083dc37abeb82908fb3c1a6ca34110ef9;hpb=7d832e12a5f66911b042885f8f07e37844501208;p=org.ibex.core.git diff --git a/src/org/xwt/util/Queue.java b/src/org/xwt/util/Queue.java index 05a9073..7d74b9c 100644 --- a/src/org/xwt/util/Queue.java +++ b/src/org/xwt/util/Queue.java @@ -70,16 +70,8 @@ public class Queue { block 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++;