projects
/
org.ibex.core.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
propose-patch
[org.ibex.core.git]
/
src
/
org
/
xwt
/
util
/
Queue.java
diff --git
a/src/org/xwt/util/Queue.java
b/src/org/xwt/util/Queue.java
index
eb36a4d
..
8da10d4
100644
(file)
--- 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) {
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--;
Object ret = vec[first];
first++;
size--;