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

Comparing jsr166/src/main/java/util/concurrent/ConcurrentLinkedDeque.java (file contents):
Revision 1.10 by jsr166, Mon Sep 13 01:48:29 2010 UTC vs.
Revision 1.11 by jsr166, Mon Sep 13 05:49:04 2010 UTC

# Line 329 | Line 329 | public class ConcurrentLinkedDeque<E>
329                          if (p != h) // hop two nodes at a time
330                              casHead(h, newNode);  // Failure is OK.
331                          return;
332                    } else {
333                        p = p.prev; // lost CAS race to another thread
332                      }
333 +                    // Lost CAS race to another thread; re-read prev
334                  }
335                  else if (p == q)
336                      continue restartFromHead;
# Line 364 | Line 363 | public class ConcurrentLinkedDeque<E>
363                          if (p != t) // hop two nodes at a time
364                              casTail(t, newNode);  // Failure is OK.
365                          return;
367                    } else {
368                        p = p.next; // lost CAS race to another thread
366                      }
367 +                    // Lost CAS race to another thread; re-read next
368                  }
369                  else if (p == q)
370                      continue restartFromTail;
# Line 1109 | Line 1107 | public class ConcurrentLinkedDeque<E>
1107                                  casTail(t, last);
1108                          }
1109                          return true;
1112                    } else {
1113                        p = p.next; // lost CAS race to another thread
1110                      }
1111 +                    // Lost CAS race to another thread; re-read next
1112                  }
1113                  else if (p == q)
1114                      continue restartFromTail;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines