Add structured-concurrency-final module: StructuredTaskScope final in JDK 28 (JEP 543), run on 28-ea, 27, 26 and 25
Runnable demos for the ankurm.com structured-concurrency-java article: the ExecutorService thread leak and its fix, every built-in Joiner, structure violations, timeouts, a custom Joiner, JSON thread dumps (in-process and jcmd), scoped values, javap diffs of the API on 25, 26, 27 and 28-ea, compiler output for six pieces of 25/26-era code, and the preview class-file trap between 27 and 28. Transcripts in output/. Co-Authored-By: Claude Sonnet 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01CifR2BE7PBvRy5hT8TS9oz
This commit is contained in:
@@ -0,0 +1,48 @@
|
||||
# javap java.util.concurrent.StructuredTaskScope and its nested types (28-beta+21-ea)
|
||||
Compiled from "StructuredTaskScope.java"
|
||||
public interface StructuredTaskScope<T, R, R_X extends Throwable> extends AutoCloseable {
|
||||
public static <T, R, R_X extends Throwable> StructuredTaskScope<T, R, R_X> open(StructuredTaskScope$Joiner<? super T, ? extends R, R_X>, UnaryOperator<StructuredTaskScope$Configuration>);
|
||||
public static <T, R, R_X extends Throwable> StructuredTaskScope<T, R, R_X> open(StructuredTaskScope$Joiner<? super T, ? extends R, R_X>);
|
||||
public static <T> StructuredTaskScope<T, Void, ExecutionException> open(UnaryOperator<StructuredTaskScope$Configuration>);
|
||||
public static <T> StructuredTaskScope<T, Void, ExecutionException> open();
|
||||
public abstract <U extends T> StructuredTaskScope$Subtask<U> fork(Callable<? extends U>);
|
||||
public abstract <U extends T> StructuredTaskScope$Subtask<U> fork(Runnable);
|
||||
public abstract R join() throws R_X, InterruptedException;
|
||||
public abstract boolean isCancelled();
|
||||
public abstract void close();
|
||||
}
|
||||
Compiled from "StructuredTaskScope.java"
|
||||
public interface StructuredTaskScope$Joiner<T, R, R_X extends Throwable> {
|
||||
public default boolean onFork(StructuredTaskScope$Subtask<T>);
|
||||
public default boolean onComplete(StructuredTaskScope$Subtask<T>);
|
||||
public abstract R result() throws R_X;
|
||||
public abstract R timeout() throws R_X;
|
||||
public static <T, R_X extends Throwable> StructuredTaskScope$Joiner<T, List<T>, R_X> allSuccessfulOrThrow(Function<Throwable, R_X>);
|
||||
public static <T> StructuredTaskScope$Joiner<T, List<T>, ExecutionException> allSuccessfulOrThrow();
|
||||
public static <T, R_X extends Throwable> StructuredTaskScope$Joiner<T, T, R_X> anySuccessfulOrThrow(Function<Throwable, R_X>);
|
||||
public static <T> StructuredTaskScope$Joiner<T, T, ExecutionException> anySuccessfulOrThrow();
|
||||
public static <T, R_X extends Throwable> StructuredTaskScope$Joiner<T, Void, R_X> awaitAllSuccessfulOrThrow(Function<Throwable, R_X>);
|
||||
public static <T> StructuredTaskScope$Joiner<T, Void, ExecutionException> awaitAllSuccessfulOrThrow();
|
||||
public static <T> StructuredTaskScope$Joiner<T, List<StructuredTaskScope$Subtask<T>>, RuntimeException> allUntil(Predicate<? super StructuredTaskScope$Subtask<T>>);
|
||||
}
|
||||
Compiled from "StructuredTaskScope.java"
|
||||
public interface StructuredTaskScope$Configuration {
|
||||
public abstract StructuredTaskScope$Configuration withThreadFactory(ThreadFactory);
|
||||
public abstract StructuredTaskScope$Configuration withName(String);
|
||||
public abstract StructuredTaskScope$Configuration withTimeout(java.time.Duration);
|
||||
}
|
||||
Compiled from "StructuredTaskScope.java"
|
||||
public interface StructuredTaskScope$Subtask<T> extends Supplier<T> {
|
||||
public abstract StructuredTaskScope$Subtask$State state();
|
||||
public abstract T get();
|
||||
public abstract Throwable exception();
|
||||
}
|
||||
Compiled from "StructuredTaskScope.java"
|
||||
public final class StructuredTaskScope$Subtask$State extends Enum<StructuredTaskScope$Subtask$State> {
|
||||
public static final StructuredTaskScope$Subtask$State UNAVAILABLE;
|
||||
public static final StructuredTaskScope$Subtask$State SUCCESS;
|
||||
public static final StructuredTaskScope$Subtask$State FAILED;
|
||||
public static StructuredTaskScope$Subtask$State[] values();
|
||||
public static StructuredTaskScope$Subtask$State valueOf(String);
|
||||
static {};
|
||||
}
|
||||
Reference in New Issue
Block a user