621 super(executor, dep, src); this.fn = fn; |
621 super(executor, dep, src); this.fn = fn; |
622 } |
622 } |
623 final CompletableFuture<V> tryFire(int mode) { |
623 final CompletableFuture<V> tryFire(int mode) { |
624 CompletableFuture<V> d; CompletableFuture<T> a; |
624 CompletableFuture<V> d; CompletableFuture<T> a; |
625 Object r; Throwable x; Function<? super T,? extends V> f; |
625 Object r; Throwable x; Function<? super T,? extends V> f; |
626 if ((d = dep) == null || (f = fn) == null |
626 if ((a = src) == null || (r = a.result) == null |
627 || (a = src) == null || (r = a.result) == null) |
627 || (d = dep) == null || (f = fn) == null) |
628 return null; |
628 return null; |
629 tryComplete: if (d.result == null) { |
629 tryComplete: if (d.result == null) { |
630 if (r instanceof AltResult) { |
630 if (r instanceof AltResult) { |
631 if ((x = ((AltResult)r).ex) != null) { |
631 if ((x = ((AltResult)r).ex) != null) { |
632 d.completeThrowable(x, r); |
632 d.completeThrowable(x, r); |
643 } |
643 } |
644 } catch (Throwable ex) { |
644 } catch (Throwable ex) { |
645 d.completeThrowable(ex); |
645 d.completeThrowable(ex); |
646 } |
646 } |
647 } |
647 } |
648 dep = null; src = null; fn = null; |
648 src = null; dep = null; fn = null; |
649 return d.postFire(a, mode); |
649 return d.postFire(a, mode); |
650 } |
650 } |
651 } |
651 } |
652 |
652 |
653 private <V> CompletableFuture<V> uniApplyStage( |
653 private <V> CompletableFuture<V> uniApplyStage( |
693 super(executor, dep, src); this.fn = fn; |
693 super(executor, dep, src); this.fn = fn; |
694 } |
694 } |
695 final CompletableFuture<Void> tryFire(int mode) { |
695 final CompletableFuture<Void> tryFire(int mode) { |
696 CompletableFuture<Void> d; CompletableFuture<T> a; |
696 CompletableFuture<Void> d; CompletableFuture<T> a; |
697 Object r; Throwable x; Consumer<? super T> f; |
697 Object r; Throwable x; Consumer<? super T> f; |
698 if ((d = dep) == null || (f = fn) == null |
698 if ((a = src) == null || (r = a.result) == null |
699 || (a = src) == null || (r = a.result) == null) |
699 || (d = dep) == null || (f = fn) == null) |
700 return null; |
700 return null; |
701 tryComplete: if (d.result == null) { |
701 tryComplete: if (d.result == null) { |
702 if (r instanceof AltResult) { |
702 if (r instanceof AltResult) { |
703 if ((x = ((AltResult)r).ex) != null) { |
703 if ((x = ((AltResult)r).ex) != null) { |
704 d.completeThrowable(x, r); |
704 d.completeThrowable(x, r); |
716 } |
716 } |
717 } catch (Throwable ex) { |
717 } catch (Throwable ex) { |
718 d.completeThrowable(ex); |
718 d.completeThrowable(ex); |
719 } |
719 } |
720 } |
720 } |
721 dep = null; src = null; fn = null; |
721 src = null; dep = null; fn = null; |
722 return d.postFire(a, mode); |
722 return d.postFire(a, mode); |
723 } |
723 } |
724 } |
724 } |
725 |
725 |
726 private CompletableFuture<Void> uniAcceptStage(Executor e, |
726 private CompletableFuture<Void> uniAcceptStage(Executor e, |
767 super(executor, dep, src); this.fn = fn; |
767 super(executor, dep, src); this.fn = fn; |
768 } |
768 } |
769 final CompletableFuture<Void> tryFire(int mode) { |
769 final CompletableFuture<Void> tryFire(int mode) { |
770 CompletableFuture<Void> d; CompletableFuture<T> a; |
770 CompletableFuture<Void> d; CompletableFuture<T> a; |
771 Object r; Throwable x; Runnable f; |
771 Object r; Throwable x; Runnable f; |
772 if ((d = dep) == null || (f = fn) == null |
772 if ((a = src) == null || (r = a.result) == null |
773 || (a = src) == null || (r = a.result) == null) |
773 || (d = dep) == null || (f = fn) == null) |
774 return null; |
774 return null; |
775 if (d.result == null) { |
775 if (d.result == null) { |
776 if (r instanceof AltResult && (x = ((AltResult)r).ex) != null) |
776 if (r instanceof AltResult && (x = ((AltResult)r).ex) != null) |
777 d.completeThrowable(x, r); |
777 d.completeThrowable(x, r); |
778 else |
778 else |
785 } |
785 } |
786 } catch (Throwable ex) { |
786 } catch (Throwable ex) { |
787 d.completeThrowable(ex); |
787 d.completeThrowable(ex); |
788 } |
788 } |
789 } |
789 } |
790 dep = null; src = null; fn = null; |
790 src = null; dep = null; fn = null; |
791 return d.postFire(a, mode); |
791 return d.postFire(a, mode); |
792 } |
792 } |
793 } |
793 } |
794 |
794 |
795 private CompletableFuture<Void> uniRunStage(Executor e, Runnable f) { |
795 private CompletableFuture<Void> uniRunStage(Executor e, Runnable f) { |
830 super(executor, dep, src); this.fn = fn; |
830 super(executor, dep, src); this.fn = fn; |
831 } |
831 } |
832 final CompletableFuture<T> tryFire(int mode) { |
832 final CompletableFuture<T> tryFire(int mode) { |
833 CompletableFuture<T> d; CompletableFuture<T> a; |
833 CompletableFuture<T> d; CompletableFuture<T> a; |
834 Object r; BiConsumer<? super T, ? super Throwable> f; |
834 Object r; BiConsumer<? super T, ? super Throwable> f; |
835 if ((d = dep) == null || (f = fn) == null |
835 if ((a = src) == null || (r = a.result) == null |
836 || (a = src) == null || (r = a.result) == null |
836 || (d = dep) == null || (f = fn) == null |
837 || !d.uniWhenComplete(r, f, mode > 0 ? null : this)) |
837 || !d.uniWhenComplete(r, f, mode > 0 ? null : this)) |
838 return null; |
838 return null; |
839 dep = null; src = null; fn = null; |
839 src = null; dep = null; fn = null; |
840 return d.postFire(a, mode); |
840 return d.postFire(a, mode); |
841 } |
841 } |
842 } |
842 } |
843 |
843 |
844 final boolean uniWhenComplete(Object r, |
844 final boolean uniWhenComplete(Object r, |
900 super(executor, dep, src); this.fn = fn; |
900 super(executor, dep, src); this.fn = fn; |
901 } |
901 } |
902 final CompletableFuture<V> tryFire(int mode) { |
902 final CompletableFuture<V> tryFire(int mode) { |
903 CompletableFuture<V> d; CompletableFuture<T> a; |
903 CompletableFuture<V> d; CompletableFuture<T> a; |
904 Object r; BiFunction<? super T, Throwable, ? extends V> f; |
904 Object r; BiFunction<? super T, Throwable, ? extends V> f; |
905 if ((d = dep) == null || (f = fn) == null |
905 if ((a = src) == null || (r = a.result) == null |
906 || (a = src) == null || (r = a.result) == null |
906 || (d = dep) == null || (f = fn) == null |
907 || !d.uniHandle(r, f, mode > 0 ? null : this)) |
907 || !d.uniHandle(r, f, mode > 0 ? null : this)) |
908 return null; |
908 return null; |
909 dep = null; src = null; fn = null; |
909 src = null; dep = null; fn = null; |
910 return d.postFire(a, mode); |
910 return d.postFire(a, mode); |
911 } |
911 } |
912 } |
912 } |
913 |
913 |
914 final <S> boolean uniHandle(Object r, |
914 final <S> boolean uniHandle(Object r, |
963 super(executor, dep, src); this.fn = fn; |
963 super(executor, dep, src); this.fn = fn; |
964 } |
964 } |
965 final CompletableFuture<T> tryFire(int mode) { |
965 final CompletableFuture<T> tryFire(int mode) { |
966 CompletableFuture<T> d; CompletableFuture<T> a; |
966 CompletableFuture<T> d; CompletableFuture<T> a; |
967 Object r; Function<? super Throwable, ? extends T> f; |
967 Object r; Function<? super Throwable, ? extends T> f; |
968 if ((d = dep) == null || (f = fn) == null |
968 if ((a = src) == null || (r = a.result) == null |
969 || (a = src) == null || (r = a.result) == null |
969 || (d = dep) == null || (f = fn) == null |
970 || !d.uniExceptionally(r, f, mode > 0 ? null : this)) |
970 || !d.uniExceptionally(r, f, mode > 0 ? null : this)) |
971 return null; |
971 return null; |
972 dep = null; src = null; fn = null; |
972 src = null; dep = null; fn = null; |
973 return d.postFire(a, mode); |
973 return d.postFire(a, mode); |
974 } |
974 } |
975 } |
975 } |
976 |
976 |
977 final boolean uniExceptionally(Object r, |
977 final boolean uniExceptionally(Object r, |
1022 } |
1022 } |
1023 final CompletableFuture<T> tryFire(int mode) { |
1023 final CompletableFuture<T> tryFire(int mode) { |
1024 CompletableFuture<T> d; CompletableFuture<T> a; |
1024 CompletableFuture<T> d; CompletableFuture<T> a; |
1025 Function<Throwable, ? extends CompletionStage<T>> f; |
1025 Function<Throwable, ? extends CompletionStage<T>> f; |
1026 Object r; Throwable x; |
1026 Object r; Throwable x; |
1027 if ((d = dep) == null || (f = fn) == null |
1027 if ((a = src) == null || (r = a.result) == null |
1028 || (a = src) == null || (r = a.result) == null) |
1028 || (d = dep) == null || (f = fn) == null) |
1029 return null; |
1029 return null; |
1030 if (d.result == null) { |
1030 if (d.result == null) { |
1031 if ((r instanceof AltResult) && |
1031 if ((r instanceof AltResult) && |
1032 (x = ((AltResult)r).ex) != null) { |
1032 (x = ((AltResult)r).ex) != null) { |
1033 try { |
1033 try { |
1084 UniRelay(CompletableFuture<U> dep, CompletableFuture<T> src) { |
1084 UniRelay(CompletableFuture<U> dep, CompletableFuture<T> src) { |
1085 super(null, dep, src); |
1085 super(null, dep, src); |
1086 } |
1086 } |
1087 final CompletableFuture<U> tryFire(int mode) { |
1087 final CompletableFuture<U> tryFire(int mode) { |
1088 CompletableFuture<U> d; CompletableFuture<T> a; Object r; |
1088 CompletableFuture<U> d; CompletableFuture<T> a; Object r; |
1089 if ((d = dep) == null |
1089 if ((a = src) == null || (r = a.result) == null |
1090 || (a = src) == null || (r = a.result) == null) |
1090 || (d = dep) == null) |
1091 return null; |
1091 return null; |
1092 if (d.result == null) |
1092 if (d.result == null) |
1093 d.completeRelay(r); |
1093 d.completeRelay(r); |
1094 src = null; dep = null; |
1094 src = null; dep = null; |
1095 return d.postFire(a, mode); |
1095 return d.postFire(a, mode); |
1126 } |
1126 } |
1127 final CompletableFuture<V> tryFire(int mode) { |
1127 final CompletableFuture<V> tryFire(int mode) { |
1128 CompletableFuture<V> d; CompletableFuture<T> a; |
1128 CompletableFuture<V> d; CompletableFuture<T> a; |
1129 Function<? super T, ? extends CompletionStage<V>> f; |
1129 Function<? super T, ? extends CompletionStage<V>> f; |
1130 Object r; Throwable x; |
1130 Object r; Throwable x; |
1131 if ((d = dep) == null || (f = fn) == null |
1131 if ((a = src) == null || (r = a.result) == null |
1132 || (a = src) == null || (r = a.result) == null) |
1132 || (d = dep) == null || (f = fn) == null) |
1133 return null; |
1133 return null; |
1134 tryComplete: if (d.result == null) { |
1134 tryComplete: if (d.result == null) { |
1135 if (r instanceof AltResult) { |
1135 if (r instanceof AltResult) { |
1136 if ((x = ((AltResult)r).ex) != null) { |
1136 if ((x = ((AltResult)r).ex) != null) { |
1137 d.completeThrowable(x, r); |
1137 d.completeThrowable(x, r); |
1153 } |
1153 } |
1154 } catch (Throwable ex) { |
1154 } catch (Throwable ex) { |
1155 d.completeThrowable(ex); |
1155 d.completeThrowable(ex); |
1156 } |
1156 } |
1157 } |
1157 } |
1158 dep = null; src = null; fn = null; |
1158 src = null; dep = null; fn = null; |
1159 return d.postFire(a, mode); |
1159 return d.postFire(a, mode); |
1160 } |
1160 } |
1161 } |
1161 } |
1162 |
1162 |
1163 private <V> CompletableFuture<V> uniComposeStage( |
1163 private <V> CompletableFuture<V> uniComposeStage( |
1268 final CompletableFuture<V> tryFire(int mode) { |
1268 final CompletableFuture<V> tryFire(int mode) { |
1269 CompletableFuture<V> d; |
1269 CompletableFuture<V> d; |
1270 CompletableFuture<T> a; |
1270 CompletableFuture<T> a; |
1271 CompletableFuture<U> b; |
1271 CompletableFuture<U> b; |
1272 Object r, s; BiFunction<? super T,? super U,? extends V> f; |
1272 Object r, s; BiFunction<? super T,? super U,? extends V> f; |
1273 if ((d = dep) == null || (f = fn) == null |
1273 if ( (a = src) == null || (r = a.result) == null |
1274 || (a = src) == null || (r = a.result) == null |
|
1275 || (b = snd) == null || (s = b.result) == null |
1274 || (b = snd) == null || (s = b.result) == null |
|
1275 || (d = dep) == null || (f = fn) == null |
1276 || !d.biApply(r, s, f, mode > 0 ? null : this)) |
1276 || !d.biApply(r, s, f, mode > 0 ? null : this)) |
1277 return null; |
1277 return null; |
1278 dep = null; src = null; snd = null; fn = null; |
1278 src = null; snd = null; dep = null; fn = null; |
1279 return d.postFire(a, b, mode); |
1279 return d.postFire(a, b, mode); |
1280 } |
1280 } |
1281 } |
1281 } |
1282 |
1282 |
1283 final <R,S> boolean biApply(Object r, Object s, |
1283 final <R,S> boolean biApply(Object r, Object s, |
1343 final CompletableFuture<Void> tryFire(int mode) { |
1343 final CompletableFuture<Void> tryFire(int mode) { |
1344 CompletableFuture<Void> d; |
1344 CompletableFuture<Void> d; |
1345 CompletableFuture<T> a; |
1345 CompletableFuture<T> a; |
1346 CompletableFuture<U> b; |
1346 CompletableFuture<U> b; |
1347 Object r, s; BiConsumer<? super T,? super U> f; |
1347 Object r, s; BiConsumer<? super T,? super U> f; |
1348 if ((d = dep) == null || (f = fn) == null |
1348 if ( (a = src) == null || (r = a.result) == null |
1349 || (a = src) == null || (r = a.result) == null |
|
1350 || (b = snd) == null || (s = b.result) == null |
1349 || (b = snd) == null || (s = b.result) == null |
|
1350 || (d = dep) == null || (f = fn) == null |
1351 || !d.biAccept(r, s, f, mode > 0 ? null : this)) |
1351 || !d.biAccept(r, s, f, mode > 0 ? null : this)) |
1352 return null; |
1352 return null; |
1353 dep = null; src = null; snd = null; fn = null; |
1353 src = null; snd = null; dep = null; fn = null; |
1354 return d.postFire(a, b, mode); |
1354 return d.postFire(a, b, mode); |
1355 } |
1355 } |
1356 } |
1356 } |
1357 |
1357 |
1358 final <R,S> boolean biAccept(Object r, Object s, |
1358 final <R,S> boolean biAccept(Object r, Object s, |
1419 final CompletableFuture<Void> tryFire(int mode) { |
1419 final CompletableFuture<Void> tryFire(int mode) { |
1420 CompletableFuture<Void> d; |
1420 CompletableFuture<Void> d; |
1421 CompletableFuture<T> a; |
1421 CompletableFuture<T> a; |
1422 CompletableFuture<U> b; |
1422 CompletableFuture<U> b; |
1423 Object r, s; Runnable f; |
1423 Object r, s; Runnable f; |
1424 if ((d = dep) == null || (f = fn) == null |
1424 if ( (a = src) == null || (r = a.result) == null |
1425 || (a = src) == null || (r = a.result) == null |
|
1426 || (b = snd) == null || (s = b.result) == null |
1425 || (b = snd) == null || (s = b.result) == null |
|
1426 || (d = dep) == null || (f = fn) == null |
1427 || !d.biRun(r, s, f, mode > 0 ? null : this)) |
1427 || !d.biRun(r, s, f, mode > 0 ? null : this)) |
1428 return null; |
1428 return null; |
1429 dep = null; src = null; snd = null; fn = null; |
1429 src = null; snd = null; dep = null; fn = null; |
1430 return d.postFire(a, b, mode); |
1430 return d.postFire(a, b, mode); |
1431 } |
1431 } |
1432 } |
1432 } |
1433 |
1433 |
1434 final boolean biRun(Object r, Object s, Runnable f, BiRun<?,?> c) { |
1434 final boolean biRun(Object r, Object s, Runnable f, BiRun<?,?> c) { |
1480 final CompletableFuture<Void> tryFire(int mode) { |
1480 final CompletableFuture<Void> tryFire(int mode) { |
1481 CompletableFuture<Void> d; |
1481 CompletableFuture<Void> d; |
1482 CompletableFuture<T> a; |
1482 CompletableFuture<T> a; |
1483 CompletableFuture<U> b; |
1483 CompletableFuture<U> b; |
1484 Object r, s, z; Throwable x; |
1484 Object r, s, z; Throwable x; |
1485 if ((d = dep) == null |
1485 if ( (a = src) == null || (r = a.result) == null |
1486 || (a = src) == null || (r = a.result) == null |
1486 || (b = snd) == null || (s = b.result) == null |
1487 || (b = snd) == null || (s = b.result) == null) |
1487 || (d = dep) == null) |
1488 return null; |
1488 return null; |
1489 if (d.result == null) { |
1489 if (d.result == null) { |
1490 if ((r instanceof AltResult |
1490 if ((r instanceof AltResult |
1491 && (x = ((AltResult)(z = r)).ex) != null) || |
1491 && (x = ((AltResult)(z = r)).ex) != null) || |
1492 (s instanceof AltResult |
1492 (s instanceof AltResult |
1555 CompletableFuture<T> src, CompletableFuture<U> snd, |
1555 CompletableFuture<T> src, CompletableFuture<U> snd, |
1556 Function<? super T,? extends V> fn) { |
1556 Function<? super T,? extends V> fn) { |
1557 super(executor, dep, src, snd); this.fn = fn; |
1557 super(executor, dep, src, snd); this.fn = fn; |
1558 } |
1558 } |
1559 final CompletableFuture<V> tryFire(int mode) { |
1559 final CompletableFuture<V> tryFire(int mode) { |
1560 CompletableFuture<V> d; |
1560 CompletableFuture<V> d; CompletableFuture<? extends T> a, b; |
1561 CompletableFuture<T> a; |
|
1562 CompletableFuture<U> b; |
|
1563 Object r; Throwable x; Function<? super T,? extends V> f; |
1561 Object r; Throwable x; Function<? super T,? extends V> f; |
1564 if ((d = dep) == null || (f = fn) == null |
1562 if ((a = src) == null || (b = snd) == null |
1565 || (a = src) == null || (b = snd) == null |
1563 || ((r = a.result) == null && (r = b.result) == null) |
1566 || ((r = a.result) == null && (r = b.result) == null)) |
1564 || (d = dep) == null || (f = fn) == null) |
1567 return null; |
1565 return null; |
1568 tryComplete: if (d.result == null) { |
1566 tryComplete: if (d.result == null) { |
1569 try { |
1567 try { |
1570 if (mode <= 0 && !claim()) |
1568 if (mode <= 0 && !claim()) |
1571 return null; |
1569 return null; |
1580 d.completeValue(f.apply(t)); |
1578 d.completeValue(f.apply(t)); |
1581 } catch (Throwable ex) { |
1579 } catch (Throwable ex) { |
1582 d.completeThrowable(ex); |
1580 d.completeThrowable(ex); |
1583 } |
1581 } |
1584 } |
1582 } |
1585 dep = null; src = null; snd = null; fn = null; |
1583 src = null; snd = null; dep = null; fn = null; |
1586 return d.postFire(a, b, mode); |
1584 return d.postFire(a, b, mode); |
1587 } |
1585 } |
1588 } |
1586 } |
1589 |
1587 |
1590 private <U extends T,V> CompletableFuture<V> orApplyStage( |
1588 private <U extends T,V> CompletableFuture<V> orApplyStage( |
1610 CompletableFuture<T> src, CompletableFuture<U> snd, |
1608 CompletableFuture<T> src, CompletableFuture<U> snd, |
1611 Consumer<? super T> fn) { |
1609 Consumer<? super T> fn) { |
1612 super(executor, dep, src, snd); this.fn = fn; |
1610 super(executor, dep, src, snd); this.fn = fn; |
1613 } |
1611 } |
1614 final CompletableFuture<Void> tryFire(int mode) { |
1612 final CompletableFuture<Void> tryFire(int mode) { |
1615 CompletableFuture<Void> d; |
1613 CompletableFuture<Void> d; CompletableFuture<? extends T> a, b; |
1616 CompletableFuture<T> a; |
|
1617 CompletableFuture<U> b; |
|
1618 Object r; Throwable x; Consumer<? super T> f; |
1614 Object r; Throwable x; Consumer<? super T> f; |
1619 if ((d = dep) == null || (f = fn) == null |
1615 if ((a = src) == null || (b = snd) == null |
1620 || (a = src) == null || (b = snd) == null |
1616 || ((r = a.result) == null && (r = b.result) == null) |
1621 || ((r = a.result) == null && (r = b.result) == null)) |
1617 || (d = dep) == null || (f = fn) == null) |
1622 return null; |
1618 return null; |
1623 tryComplete: if (d.result == null) { |
1619 tryComplete: if (d.result == null) { |
1624 try { |
1620 try { |
1625 if (mode <= 0 && !claim()) |
1621 if (mode <= 0 && !claim()) |
1626 return null; |
1622 return null; |
1636 d.completeNull(); |
1632 d.completeNull(); |
1637 } catch (Throwable ex) { |
1633 } catch (Throwable ex) { |
1638 d.completeThrowable(ex); |
1634 d.completeThrowable(ex); |
1639 } |
1635 } |
1640 } |
1636 } |
1641 dep = null; src = null; snd = null; fn = null; |
1637 src = null; snd = null; dep = null; fn = null; |
1642 return d.postFire(a, b, mode); |
1638 return d.postFire(a, b, mode); |
1643 } |
1639 } |
1644 } |
1640 } |
1645 |
1641 |
1646 private <U extends T> CompletableFuture<Void> orAcceptStage( |
1642 private <U extends T> CompletableFuture<Void> orAcceptStage( |
1666 CompletableFuture<T> src, CompletableFuture<U> snd, |
1662 CompletableFuture<T> src, CompletableFuture<U> snd, |
1667 Runnable fn) { |
1663 Runnable fn) { |
1668 super(executor, dep, src, snd); this.fn = fn; |
1664 super(executor, dep, src, snd); this.fn = fn; |
1669 } |
1665 } |
1670 final CompletableFuture<Void> tryFire(int mode) { |
1666 final CompletableFuture<Void> tryFire(int mode) { |
1671 CompletableFuture<Void> d; |
1667 CompletableFuture<Void> d; CompletableFuture<?> a, b; |
1672 CompletableFuture<T> a; |
|
1673 CompletableFuture<U> b; |
|
1674 Object r; Throwable x; Runnable f; |
1668 Object r; Throwable x; Runnable f; |
1675 if ((d = dep) == null || (f = fn) == null |
1669 if ((a = src) == null || (b = snd) == null |
1676 || (a = src) == null || (b = snd) == null |
1670 || ((r = a.result) == null && (r = b.result) == null) |
1677 || ((r = a.result) == null && (r = b.result) == null)) |
1671 || (d = dep) == null || (f = fn) == null) |
1678 return null; |
1672 return null; |
1679 if (d.result == null) { |
1673 if (d.result == null) { |
1680 try { |
1674 try { |
1681 if (mode <= 0 && !claim()) |
1675 if (mode <= 0 && !claim()) |
1682 return null; |
1676 return null; |
1689 } |
1683 } |
1690 } catch (Throwable ex) { |
1684 } catch (Throwable ex) { |
1691 d.completeThrowable(ex); |
1685 d.completeThrowable(ex); |
1692 } |
1686 } |
1693 } |
1687 } |
1694 dep = null; src = null; snd = null; fn = null; |
1688 src = null; snd = null; dep = null; fn = null; |
1695 return d.postFire(a, b, mode); |
1689 return d.postFire(a, b, mode); |
1696 } |
1690 } |
1697 } |
1691 } |
1698 |
1692 |
1699 private CompletableFuture<Void> orRunStage(Executor e, CompletionStage<?> o, |
1693 private CompletableFuture<Void> orRunStage(Executor e, CompletionStage<?> o, |
1724 final CompletableFuture<Object> tryFire(int mode) { |
1718 final CompletableFuture<Object> tryFire(int mode) { |
1725 // assert mode != ASYNC; |
1719 // assert mode != ASYNC; |
1726 CompletableFuture<Object> d; CompletableFuture<?> a; |
1720 CompletableFuture<Object> d; CompletableFuture<?> a; |
1727 CompletableFuture<?>[] as; |
1721 CompletableFuture<?>[] as; |
1728 Object r; |
1722 Object r; |
1729 if ((d = dep) == null |
1723 if ((a = src) == null || (r = a.result) == null |
1730 || (a = src) == null || (r = a.result) == null |
1724 || (d = dep) == null || (as = srcs) == null) |
1731 || (as = srcs) == null) |
|
1732 return null; |
1725 return null; |
1733 dep = null; src = null; srcs = null; |
1726 src = null; dep = null; srcs = null; |
1734 if (d.completeRelay(r)) { |
1727 if (d.completeRelay(r)) { |
1735 for (CompletableFuture<?> b : as) |
1728 for (CompletableFuture<?> b : as) |
1736 if (b != a) |
1729 if (b != a) |
1737 b.cleanStack(); |
1730 b.cleanStack(); |
1738 if (mode < 0) |
1731 if (mode < 0) |