[cvs] / jsr166 / src / main / java / util / concurrent / LinkedTransferQueue.java Repository:
ViewVC logotype

Diff of /jsr166/src/main/java/util/concurrent/LinkedTransferQueue.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.70, Mon Jun 23 23:04:42 2014 UTC revision 1.71, Thu Aug 21 11:35:15 2014 UTC
# Line 680  Line 680 
680                  @SuppressWarnings("unchecked") E itemE = (E) item;                  @SuppressWarnings("unchecked") E itemE = (E) item;
681                  return itemE;                  return itemE;
682              }              }
683              if ((w.isInterrupted() || (timed && nanos <= 0)) &&              else if (w.isInterrupted() || (timed && nanos <= 0)) {
684                      s.casItem(e, s)) {        // cancel                   unsplice(pred, s);           // try to unlink and cancel
685                  unsplice(pred, s);                   if (s.casItem(e, s))         // return normally if lost CAS
686                  return e;                  return e;
687              }              }
688                else if (spins < 0) {            // establish spins at/near front
             if (spins < 0) {                  // establish spins at/near front  
689                  if ((spins = spinsFor(pred, s.isData)) > 0)                  if ((spins = spinsFor(pred, s.isData)) > 0)
690                      randomYields = ThreadLocalRandom.current();                      randomYields = ThreadLocalRandom.current();
691              }              }
# Line 1023  Line 1022 
1022       * @param s the node to be unspliced       * @param s the node to be unspliced
1023       */       */
1024      final void unsplice(Node pred, Node s) {      final void unsplice(Node pred, Node s) {
1025          s.forgetContents(); // forget unneeded fields          s.waiter = null; // disable signals
1026          /*          /*
1027           * See above for rationale. Briefly: if pred still points to           * See above for rationale. Briefly: if pred still points to
1028           * s, try to unlink s.  If s cannot be unlinked, because it is           * s, try to unlink s.  If s cannot be unlinked, because it is

Legend:
Removed from v.1.70  
changed lines
  Added in v.1.71

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8