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.114 by jsr166, Mon Mar 23 18:48:19 2015 UTC vs.
Revision 1.115 by jsr166, Sat Sep 19 20:52:58 2015 UTC

# Line 180 | Line 180 | public class SynchronousQueue<E> extends
180       * The number of nanoseconds for which it is faster to spin
181       * rather than to use timed park. A rough estimate suffices.
182       */
183 <    static final long spinForTimeoutThreshold = 1000L;
183 >    static final long SPIN_FOR_TIMEOUT_THRESHOLD = 1000L;
184  
185      /** Dual stack */
186      static final class TransferStack<E> extends Transferer<E> {
# Line 430 | Line 430 | public class SynchronousQueue<E> extends
430                      s.waiter = w; // establish waiter so can park next iter
431                  else if (!timed)
432                      LockSupport.park(this);
433 <                else if (nanos > spinForTimeoutThreshold)
433 >                else if (nanos > SPIN_FOR_TIMEOUT_THRESHOLD)
434                      LockSupport.parkNanos(this, nanos);
435              }
436          }
# Line 731 | Line 731 | public class SynchronousQueue<E> extends
731                      s.waiter = w;
732                  else if (!timed)
733                      LockSupport.park(this);
734 <                else if (nanos > spinForTimeoutThreshold)
734 >                else if (nanos > SPIN_FOR_TIMEOUT_THRESHOLD)
735                      LockSupport.parkNanos(this, nanos);
736              }
737          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines