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

Comparing jsr166/src/main/java/util/concurrent/CountedCompleter.java (file contents):
Revision 1.56 by jsr166, Thu Jun 2 13:40:42 2016 UTC vs.
Revision 1.57 by dl, Fri Jun 17 13:03:45 2016 UTC

# Line 522 | Line 522 | public abstract class CountedCompleter<T
522      public final int decrementPendingCountUnlessZero() {
523          int c;
524          do {} while ((c = pending) != 0 &&
525 <                     !PENDING.compareAndSet(this, c, c - 1));
525 >                     !PENDING.weakCompareAndSetVolatile(this, c, c - 1));
526          return c;
527      }
528  
# Line 555 | Line 555 | public abstract class CountedCompleter<T
555                      return;
556                  }
557              }
558 <            else if (PENDING.compareAndSet(a, c, c - 1))
558 >            else if (PENDING.weakCompareAndSetVolatile(a, c, c - 1))
559                  return;
560          }
561      }
# Line 578 | Line 578 | public abstract class CountedCompleter<T
578                      return;
579                  }
580              }
581 <            else if (PENDING.compareAndSet(a, c, c - 1))
581 >            else if (PENDING.weakCompareAndSetVolatile(a, c, c - 1))
582                  return;
583          }
584      }
# Line 623 | Line 623 | public abstract class CountedCompleter<T
623          for (int c;;) {
624              if ((c = pending) == 0)
625                  return this;
626 <            else if (PENDING.compareAndSet(this, c, c - 1))
626 >            else if (PENDING.weakCompareAndSetVolatile(this, c, c - 1))
627                  return null;
628          }
629      }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines