ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/main/java/util/concurrent/DelayQueue.java
(Generate patch)

Comparing jsr166/src/main/java/util/concurrent/DelayQueue.java (file contents):
Revision 1.11 by tim, Wed Aug 6 18:22:09 2003 UTC vs.
Revision 1.12 by dl, Thu Aug 7 16:00:28 2003 UTC

# Line 103 | Line 103 | public class DelayQueue<E extends Delaye
103          try {
104              for (;;) {
105                  E first = q.peek();
106 <                if (first == null)
106 >                if (first == null) {
107                      available.await();
108 +                }
109                  else {
110                      long delay =  first.getDelay(TimeUnit.NANOSECONDS);
111 <                    if (delay > 0)
112 <                        available.awaitNanos(delay);
111 >                    if (delay > 0) {
112 >                        long tl = available.awaitNanos(delay);
113 >                    }
114                      else {
115                          E x = q.poll();
116                          assert x != null;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines