projects
/
org.ibex.core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2b2b24b
)
2004/01/27 05:22:40
author
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 08:05:29 +0000
(08:05 +0000)
committer
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 08:05:29 +0000
(08:05 +0000)
darcs-hash:
20040130080529
-2ba56-
92539ea64bfc0cacc192d3826fc1bd60be102ca2
.gz
src/org/xwt/util/Queue.java
patch
|
blob
|
history
diff --git
a/src/org/xwt/util/Queue.java
b/src/org/xwt/util/Queue.java
index
7d74b9c
..
eb36a4d
100644
(file)
--- a/
src/org/xwt/util/Queue.java
+++ b/
src/org/xwt/util/Queue.java
@@
-70,9
+70,14
@@
public class Queue {
<tt>block</tt> is true and the queue is empty. */
public synchronized Object remove(boolean block) {
- try { wait(); } catch (InterruptedException e) { }
- if (!block) return null;
+ while (size == 0 && block) {
+ try {
+ wait();
+ } catch (InterruptedException e) {
+ }
+ }
+ if (!block) return null;
Object ret = vec[first];
first++;
size--;