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

Comparing jsr166/src/main/java/util/concurrent/Phaser.java (file contents):
Revision 1.73 by jsr166, Sun Nov 18 18:03:11 2012 UTC vs.
Revision 1.74 by jsr166, Thu Aug 21 05:33:40 2014 UTC

# Line 1036 | Line 1036 | public class Phaser {
1036              else {
1037                  try {
1038                      ForkJoinPool.managedBlock(node);
1039 <                } catch (InterruptedException ie) {
1039 >                } catch (InterruptedException cantHappen) {
1040                      node.wasInterrupted = true;
1041                  }
1042              }
# Line 1105 | Line 1105 | public class Phaser {
1105          }
1106  
1107          public boolean block() {
1108 <            if (isReleasable())
1109 <                return true;
1110 <            else if (!timed)
1111 <                LockSupport.park(this);
1112 <            else if (nanos > 0L)
1113 <                LockSupport.parkNanos(this, nanos);
1114 <            return isReleasable();
1108 >            while (!isReleasable()) {
1109 >                if (!timed)
1110 >                    LockSupport.park(this);
1111 >                else
1112 >                    LockSupport.parkNanos(this, nanos);
1113 >            }
1114 >            return true;
1115          }
1116      }
1117  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines