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.71 by jsr166, Sun Sep 20 17:03:22 2015 UTC vs.
Revision 1.72 by jsr166, Sat Oct 3 18:17:51 2015 UTC

# Line 187 | Line 187 | public class DelayQueue<E extends Delaye
187                      available.await();
188                  else {
189                      long delay = first.getDelay(NANOSECONDS);
190 <                    if (delay <= 0)
190 >                    if (delay <= 0L)
191                          return q.poll();
192                      first = null; // don't retain ref while waiting
193                      if (leader != null)
# Line 229 | Line 229 | public class DelayQueue<E extends Delaye
229              for (;;) {
230                  E first = q.peek();
231                  if (first == null) {
232 <                    if (nanos <= 0)
232 >                    if (nanos <= 0L)
233                          return null;
234                      else
235                          nanos = available.awaitNanos(nanos);
236                  } else {
237                      long delay = first.getDelay(NANOSECONDS);
238 <                    if (delay <= 0)
238 >                    if (delay <= 0L)
239                          return q.poll();
240 <                    if (nanos <= 0)
240 >                    if (nanos <= 0L)
241                          return null;
242                      first = null; // don't retain ref while waiting
243                      if (nanos < delay || leader != null)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines