JEP 543, Structured Concurrency, has been integrated into JDK 28, transitioning the StructuredTaskScope API within java.util.concurrent to a final status. This finalization occurred without any API changes from its seventh preview in JDK 27, meaning codebases on JDK 27 can migrate by recompiling without the --enable-preview flag.
The finalization of JEP 543 marks the conclusion of the longest preview cycle for any Project Loom feature. Structured concurrency was first introduced as an incubator API in JDK 19 (JEP 428) and JDK 20 (JEP 437), then progressed through seven preview iterations across subsequent JDK releases up to JDK 27.
The core objective of Structured Concurrency is to treat groups of related subtasks running in different threads as a single unit of work. This ensures that a failure in one subtask leads to the cancellation of others, and the parent scope cannot exit until all child threads have terminated. This addresses limitations in traditional ExecutorService and Future pipelines, where parent methods could return while subtasks continued, and failures only surfaced upon explicit Future.get() calls.
The API centers on the sealed interface StructuredTaskScope<T, R, R_X extends Throwable>, which is opened via static factory methods like open(). The join() method waits for subtasks, cancels others on the first failure, and throws ExecutionException. Each fork() call starts a virtual thread by default, and the close() method in a try-with-resources block cancels unfinished subtasks and waits for their threads to terminate.
Completion policies are defined through the Joiner<T, R, R_X> interface, offering methods such as Joiner.awaitAllSuccessfulOrThrow(), Joiner.allSuccessfulOrThrow(), Joiner.anySuccessfulOrThrow(), and Joiner.allUntil(Predicate) to manage subtask completion and cancellation behavior.
✨ This summary was generated by AI from the outlets' reporting listed below. It is not independently verified and may contain errors — check the original sources. How BrevFeed works →
One email each morning: the day's tech stories, clustered across outlets and summarized. No account needed.
One email a day. Unsubscribe in one click, any time.
Spend a few minutes, get the whole day. Every topic's top stories in one hands-free rundown — listen, watch, or read the transcript.
▶ Play today's briefNew every morning, and the back catalogue is archived by date.
JEP 543, Structured Concurrency, has been finalized and integrated into JDK 28, making the StructuredTaskScope API a stable feature. This concludes the longest preview cycle for a Project Loom feature, providing a standardized way to manage groups of related subtasks as a single unit of work.