![]() More details on JEP 428 may be found in this InfoQ news story. This streamlines the sharing of immutable data across threads. The only change is an updated StructuredTaskScope class to support the inheritance of scoped values by threads created in a task scope. This can streamline error handling and cancellation, improve reliability, and enhance observability. The intent of this feature is to simplify multithreaded programming by introducing a library to treat multiple tasks running in different threads as a single unit of work. JEP 437, Structured Concurrency (Second Incubator), proposes to reincubate this feature from JEP 428, Structured Concurrency (Incubator), delivered in JDK 19, to allow time for additional feedback and experience. More details on JEP 425 may be found in this InfoQ news story and this JEP Café screen cast by José Paumard, Java developer advocate, Java Platform Group at Oracle. It is important to note that no changes are within this preview except for a small number of APIs from JEP 425 that were made permanent in JDK 19 and, therefore, not proposed in this second preview. This feature provides virtual threads, lightweight threads that dramatically reduce the effort of writing, maintaining, and observing high-throughput concurrent applications, to the Java platform. JEP 436, Virtual Threads (Second Preview), proposes a second preview from JEP 425, Virtual Threads (Preview), delivered in JDK 19, to allow time for additional feedback and experience for this feature to progress. This is preferred to thread-local variables, especially when using large numbers of virtual threads. JEP 429, Scoped Values (Incubator), an incubating JEP formerly known as Extent-Local Variables (Incubator), proposes to enable sharing of immutable data within and across threads. Changes from JEP 427 include: a simplified grammar for switch labels and inference of type arguments for generic type patterns and record patterns is now supported in switch expressions and statements along with the other constructs that support patterns. Similarly, JEP 433, Pattern Matching for switch (Fourth Preview), incorporates enhancements in response to feedback from the previous three rounds of preview: JEP 427, Pattern Matching for switch (Third Preview), delivered in JDK 19 JEP 420, Pattern Matching for switch (Second Preview), delivered in JDK 18 and JEP 406, Pattern Matching for switch (Preview), delivered in JDK 17. Changes from JEP 405 include: added support for inference of type arguments of generic record patterns added support for record patterns to appear in the header of an enhanced for statement and remove support for named record patterns. Record patterns may be used in conjunction with type patterns to "enable a powerful, declarative, and composable form of data navigation and processing." Type patterns were recently extended for use in switch case labels via: JEP 406, Pattern Matching for switch (Preview), delivered in JDK 17 and JEP 420, Pattern Matching for switch (Second Preview), delivered in JDK 18. This proposes to enhance the language with record patterns to deconstruct record values. JEP 432, Record Patterns (Second Preview), incorporates enhancements in response to feedback from the previous round of preview, JEP 405, Record Patterns (Preview). We examine these new features and include where they fall under the auspices of the four major Java projects - Amber, Loom, Panama and Valhalla - designed to incubate a series of components for eventual inclusion in the JDK through a curated merge. JEP 433: Pattern Matching for switch (Fourth Preview).JEP 432: Record Patterns (Second Preview).Two (2) of these new features are categorized under the Java Specification: JEP 437: Structured Concurrency (Second Incubator).JEP 436: Virtual Threads (Second Preview).JEP 434: Foreign Function & Memory API (Second Preview).The final set of seven (7) new features, in the form of JEPs, can be separated into two (2) categories: Core Java Library and Java Specification.įive (5) of these new features are categorized under the Core Java Library: It is worth noting that JEP 438 was added to the feature set in early March 2023. As per the release schedule, JDK 20 will be formally released on March 21, 2023. Critical bugs, such as regressions or serious functionality issues, may be addressed, but must be approved via the Fix-Request process. The main-line source repository, forked to the JDK stabilization repository in mid-December 2022 (Rampdown Phase One), defines the feature set for JDK 20. JDK 20, the third non-LTS release since JDK 17, has reached its initial release candidate phase as declared by Mark Reinhold, chief architect, Java Platform Group at Oracle.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |