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

Comparing jsr166/src/main/java/util/concurrent/CompletableFuture.java (file contents):
Revision 1.221 by dl, Tue Jul 14 20:05:10 2020 UTC vs.
Revision 1.222 by dl, Fri Oct 16 11:48:41 2020 UTC

# Line 1855 | Line 1855 | public class CompletableFuture<T> implem
1855              }
1856              else if (!queued)
1857                  queued = tryPushStack(q);
1858 +            else if (interruptible && q.interrupted) {
1859 +                q.thread = null;
1860 +                cleanStack();
1861 +                return null;
1862 +            }
1863              else {
1864                  try {
1865                      ForkJoinPool.managedBlock(q);
1866                  } catch (InterruptedException ie) { // currently cannot happen
1867                      q.interrupted = true;
1868                  }
1864                if (q.interrupted && interruptible)
1865                    break;
1869              }
1870          }
1871 <        if (q != null && queued) {
1871 >        if (q != null) {
1872              q.thread = null;
1873 <            if (!interruptible && q.interrupted)
1873 >            if (q.interrupted)
1874                  Thread.currentThread().interrupt();
1872            if (r == null)
1873                cleanStack();
1875          }
1876 <        if (r != null || (r = result) != null)
1876 <            postComplete();
1876 >        postComplete();
1877          return r;
1878      }
1879  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines