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

Comparing jsr166/src/jdk8/java/util/concurrent/CompletableFuture.java (file contents):
Revision 1.3 by dl, Sun Apr 3 14:42:09 2016 UTC vs.
Revision 1.4 by dl, Tue Apr 5 22:53:24 2016 UTC

# Line 1845 | Line 1845 | public class CompletableFuture<T> implem
1845          while ((r = result) == null) {
1846              if (q == null) {
1847                  q = new Signaller(interruptible, 0L, 0L);
1848 <                ForkJoinPool.helpAsyncBlocker(defaultExecutor(), q);
1848 >                if (Thread.currentThread() instanceof ForkJoinWorkerThread)
1849 >                    ForkJoinPool.helpAsyncBlocker(defaultExecutor(), q);
1850              }
1851              else if (!queued)
1852                  queued = tryPushStack(q);
# Line 1887 | Line 1888 | public class CompletableFuture<T> implem
1888              while ((r = result) == null) { // similar to untimed
1889                  if (q == null) {
1890                      q = new Signaller(true, nanos, deadline);
1891 <                    ForkJoinPool.helpAsyncBlocker(defaultExecutor(), q);
1891 >                    if (Thread.currentThread() instanceof ForkJoinWorkerThread)
1892 >                        ForkJoinPool.helpAsyncBlocker(defaultExecutor(), q);
1893                  }
1894                  else if (!queued)
1895                      queued = tryPushStack(q);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines