-
CSR
-
Resolution: Approved
-
P3
-
None
-
minimal
-
Developers using the incubator API will need some code and command line changes to use the preview API.
-
Java API
-
SE
Summary
Add a basic API for "Structured Concurrency". Structured concurrency treats multiple tasks running in different threads as a single unit of work, thereby streamlining error handling and cancellation, improving reliability, and enhancing observability. The API is proposed as a preview API. It previously incubated as JEP 428 and JEP 437.
Problem
The goal of this feature is unchanged, that is the goal is to improve the maintainability, reliability, and observability of multithreaded code, in a style that eliminates common risks arising from cancellation and shutdown.
Solution
The preview APIs proposed are:
java.util.concurrent.StructuredTaskScope
java.util.concurrent.StructuredTaskScope.Subtask
java.util.concurrent.StructuredTaskScope.Subtask.State
java.util.concurrent.StructuredTaskScope.ShutdownOnSuccess
java.util.concurrent.StructuredTaskScope.ShutdownOnFailure
java.util.concurrent.StructureViolationException
In conjunction with JEP 446, remove module jdk.incubator.concurrent.
Specification
A zip file with the spec diff is attached. This issue is also linked to online API docs to make it easier to look at.
- csr of
-
JDK-8306647 Implementation of Structured Concurrency (Preview)
-
- Resolved
-
- relates to
-
JDK-8284200 Implementation of Structured Concurrency (Incubator)
-
- Closed
-
-
JDK-8296780 Implementation of Structured Concurrency (Second Incubator)
-
- Closed
-
-
JDK-8342487 Implement JEP draft: Structured Concurrency (Fifth Preview)
-
- Provisional
-
- links to