388 |
|
} |
389 |
|
|
390 |
|
/** Base class can act as either FJ or plain Runnable */ |
391 |
< |
static abstract class Async extends ForkJoinTask<Void> |
391 |
> |
abstract static class Async extends ForkJoinTask<Void> |
392 |
|
implements Runnable, AsynchronousCompletionTask { |
393 |
|
public final Void getRawResult() { return null; } |
394 |
|
public final void setRawResult(Void v) { } |
557 |
|
} |
558 |
|
|
559 |
|
// Opportunistically subclass AtomicInteger to use compareAndSet to claim. |
560 |
< |
static abstract class Completion extends AtomicInteger implements Runnable { |
560 |
> |
abstract static class Completion extends AtomicInteger implements Runnable { |
561 |
|
} |
562 |
|
|
563 |
|
static final class ApplyCompletion<T,U> extends Completion { |
2449 |
|
* then the returned CompletableFuture also does so, with a |
2450 |
|
* CompletionException holding this exception as its cause. |
2451 |
|
* |
2452 |
< |
* @param fn the function returning a new CompletableFuture. |
2452 |
> |
* @param fn the function returning a new CompletableFuture |
2453 |
|
* @return the CompletableFuture, that {@code isDone()} upon |
2454 |
|
* return if completed by the given function, or an exception |
2455 |
< |
* occurs. |
2455 |
> |
* occurs |
2456 |
|
*/ |
2457 |
|
public <U> CompletableFuture<U> thenCompose(Fun<? super T, |
2458 |
|
CompletableFuture<U>> fn) { |
2654 |
|
} |
2655 |
|
|
2656 |
|
/** |
2657 |
< |
* Forcibly causes subsequent invocations of method get() and |
2658 |
< |
* related methods to throw the given exception, whether or not |
2659 |
< |
* already completed. This method is designed for use only in |
2657 |
> |
* Forcibly causes subsequent invocations of method {@link #get()} |
2658 |
> |
* and related methods to throw the given exception, whether or |
2659 |
> |
* not already completed. This method is designed for use only in |
2660 |
|
* recovery actions, and even in such situations may result in |
2661 |
|
* ongoing dependent completions using established versus |
2662 |
|
* overwritten outcomes. |