JEP 533: Structured Concurrency Reaches Integrated Status for JDK 27
JEP 533, which defines the Structured Concurrency API built on Project Loom's virtual threads, has reached integrated status in the JDK 27 repository — a meaningful milestone that takes it from "targeted" (approved for inclusion) to "merged" (code landed in the mainline). This represents the culmination of several preview cycles during which the community worked through the API's shape, and signals that the design has reached a level of stability the OpenJDK team considers fit for shipping.
The integration brings two notable refinements over previous preview iterations. First, exception handling receives a dedicated ExecutionException type that preserves causation chains more cleanly than the generic Exception wrapper used in earlier previews. When a subtask fails, the new type carries structured information about which scope triggered the failure, making it significantly easier to write correct error-handling logic in code that fans out work across many virtual threads. Second, the Joiner interface — the abstraction that controls how a StructuredTaskScope aggregates its subtask results — gains a new open overload that allows simpler scope creation for common patterns without requiring a full custom Joiner implementation.
For developers already using structured concurrency in preview mode, the migration path is straightforward: the core StructuredTaskScope and ShutdownOnFailure/ShutdownOnSuccess patterns remain, with the changes concentrated in the exception hierarchy and the Joiner configuration surface. Teams who relied on the generic exception handling in preview will need to update catch blocks to handle ExecutionException specifically. The API is still marked as a preview feature in JDK 27 rather than final, but the integrated status means no further structural changes are expected before GA.
Read more — InfoQ