RFR: 8306647: Implementation of Structured Concurrency (Preview)
Andrey Turbanov
aturbanov at openjdk.org
Wed May 24 17:41:57 UTC 2023
On Thu, 11 May 2023 13:08:55 GMT, Alan Bateman <alanb at openjdk.org> wrote:
> This is the implementation of:
>
> - JEP 453: Structured Concurrency (Preview)
> - JEP 446: Scoped Values (Preview)
>
> For the most part, this is just moving code and tests. StructuredTaskScope moves to j.u.concurrent as a preview API, ScopedValue moves to j.lang as a preview API, and module jdk.incubator.concurrent has been removed. The significant API changes since incubator are:
>
> - StructuredTaskScope.fork returns Subtask instead of Future (JEP 453 has a section on this)
> - ScopedValue.where methods are replaced with runWhere, callWhere and getWhere
test/jdk/java/util/concurrent/StructuredTaskScope/StructuredTaskScopeTest.java line 1016:
> 1014: scope.join();
> 1015:
> 1016: var subtask1 = scope.find(task1);
Suggestion:
var subtask1 = scope.find(task1);
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13932#discussion_r1204557338
More information about the hotspot-dev
mailing list