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

Comparing jsr166/src/main/java/util/concurrent/SynchronousQueue.java (file contents):
Revision 1.104 by jsr166, Thu Aug 28 12:59:36 2014 UTC vs.
Revision 1.105 by jsr166, Sat Nov 29 03:03:14 2014 UTC

# Line 408 | Line 408 | public class SynchronousQueue<E> extends
408               */
409              final long deadline = timed ? System.nanoTime() + nanos : 0L;
410              Thread w = Thread.currentThread();
411 <            int spins = (shouldSpin(s) ?
412 <                         (timed ? maxTimedSpins : maxUntimedSpins) : 0);
411 >            int spins = shouldSpin(s)
412 >                ? (timed ? maxTimedSpins : maxUntimedSpins)
413 >                : 0;
414              for (;;) {
415                  if (w.isInterrupted())
416                      s.tryCancel();
# Line 712 | Line 713 | public class SynchronousQueue<E> extends
713              /* Same idea as TransferStack.awaitFulfill */
714              final long deadline = timed ? System.nanoTime() + nanos : 0L;
715              Thread w = Thread.currentThread();
716 <            int spins = ((head.next == s) ?
717 <                         (timed ? maxTimedSpins : maxUntimedSpins) : 0);
716 >            int spins = (head.next == s)
717 >                ? (timed ? maxTimedSpins : maxUntimedSpins)
718 >                : 0;
719              for (;;) {
720                  if (w.isInterrupted())
721                      s.tryCancel(e);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines