X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=src%2Forg%2Fxwt%2Futil%2FQueue.java;h=8da10d4d8945abb522b51bfe7a260804a8a1f453;hb=de378041d5ca2aca1a2b5a31ef15ae90a86c977f;hp=eb36a4d6463a47e6ec1ac59a8453573862dea248;hpb=53d199993605c1ad63f3bbe8e2cbab64c17202e1;p=org.ibex.core.git diff --git a/src/org/xwt/util/Queue.java b/src/org/xwt/util/Queue.java index eb36a4d..8da10d4 100644 --- a/src/org/xwt/util/Queue.java +++ b/src/org/xwt/util/Queue.java @@ -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--;