# Uses of Interface
java.util.concurrent.StructuredTaskScope.Subtask

Packages that use StructuredTaskScope.SubtaskPREVIEW
Package
Description
java.util.concurrent
Utility classes commonly useful in concurrent programming.

## Uses of StructuredTaskScope.SubtaskPREVIEW in java.util.concurrent

Methods in java.util.concurrent that return StructuredTaskScope.SubtaskPREVIEW
Modifier and Type
Method
Description
`<U extends T>
StructuredTaskScope.SubtaskPREVIEW<U>`
StructuredTaskScope.`fork(Runnable task)`
Fork a subtask by starting a new thread in this scope to execute a method that does not return a result.
`<U extends T>
StructuredTaskScope.SubtaskPREVIEW<U>`
StructuredTaskScope.`fork(Callable<? extends U> task)`
Fork a subtask by starting a new thread in this scope to execute a value-returning method.
Methods in java.util.concurrent that return types with arguments of type StructuredTaskScope.SubtaskPREVIEW
Modifier and Type
Method
Description
`static <T> StructuredTaskScope.JoinerPREVIEW<T, Stream<StructuredTaskScope.SubtaskPREVIEW<T>>>`
StructuredTaskScope.Joiner.`allSuccessfulOrThrow()`
Returns a new Joiner object that yields a stream of all subtasks when all subtasks complete successfully.
`static <T> StructuredTaskScope.JoinerPREVIEW<T, Stream<StructuredTaskScope.SubtaskPREVIEW<T>>>`
StructuredTaskScope.Joiner.`allUntil(Predicate<StructuredTaskScope.SubtaskPREVIEW<? extends T>> isDone)`
Returns a new Joiner object that yields a stream of all subtasks when all subtasks complete or a predicate returns `true` to cancel the scope.
Methods in java.util.concurrent with parameters of type StructuredTaskScope.SubtaskPREVIEW
Modifier and Type
Method
Description
`default boolean`
StructuredTaskScope.Joiner.`onComplete(StructuredTaskScope.SubtaskPREVIEW<? extends T> subtask)`
Invoked by the thread started to execute a subtask after the subtask completes successfully or fails with an exception.
`default boolean`
StructuredTaskScope.Joiner.`onFork(StructuredTaskScope.SubtaskPREVIEW<? extends T> subtask)`
Invoked by `fork(Callable)`PREVIEW and `fork(Runnable)`PREVIEW when forking a subtask.
Method parameters in java.util.concurrent with type arguments of type StructuredTaskScope.SubtaskPREVIEW
Modifier and Type
Method
Description
`static <T> StructuredTaskScope.JoinerPREVIEW<T, Stream<StructuredTaskScope.SubtaskPREVIEW<T>>>`
StructuredTaskScope.Joiner.`allUntil(Predicate<StructuredTaskScope.SubtaskPREVIEW<? extends T>> isDone)`
Returns a new Joiner object that yields a stream of all subtasks when all subtasks complete or a predicate returns `true` to cancel the scope.