[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.140, Sat Jan 14 06:59:57 2017 UTC revision 1.141, Sat Jan 14 21:14:47 2017 UTC
# Line 617  Line 617 
617    
618          restartFromHead: for (;;) {          restartFromHead: for (;;) {
619              for (Node h = head, p = h; p != null;) { // find & match first node              for (Node h = head, p = h; p != null;) { // find & match first node
620                  boolean isData = p.isData;                  final boolean isData;
621                  Object item = p.item;                  final Object item;
622                  if ((item != null) == isData) { // unmatched                  if (((item = p.item) != null) == (isData = p.isData)) {
623                        // unmatched
624                      if (isData == haveData)   // can't match                      if (isData == haveData)   // can't match
625                          break;                          break;
626                      if (p.casItem(item, e)) { // match                      if (p.casItem(item, e)) { // match
# Line 709  Line 710 
710          ThreadLocalRandom randomYields = null; // bound if needed          ThreadLocalRandom randomYields = null; // bound if needed
711    
712          for (;;) {          for (;;) {
713              Object item = s.item;              final Object item;
714              if (item != e) {                  // matched              if ((item = s.item) != e) {       // matched
715                  // assert item != s;                  // assert item != s;
716                  s.forgetContents();           // avoid garbage                  s.forgetContents();           // avoid garbage
717                  @SuppressWarnings("unchecked") E itemE = (E) item;                  @SuppressWarnings("unchecked") E itemE = (E) item;

Legend:
Removed from v.1.140  
changed lines
  Added in v.1.141

Doug Lea
ViewVC Help
Powered by ViewVC 1.0.8