RFR: 8288899: java/util/concurrent/ExecutorService/CloseTest.java failed with "InterruptedException: sleep interrupted" [v4]
Doug Lea
dl at openjdk.org
Sat Aug 19 12:54:33 UTC 2023
On Thu, 17 Aug 2023 15:25:49 GMT, Viktor Klang <duke at openjdk.org> wrote:
>> Doug Lea has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 45 additional commits since the last revision:
>>
>> - Merge branch 'openjdk:master' into JDK-8288899
>> - Update @since tags
>> - resync
>> - Merge branch 'openjdk:master' into JDK-8288899
>> - ExecutorService tests
>> - Merge branch 'openjdk:master' into JDK-8288899
>> - Rework versioning
>> - Merge branch 'openjdk:master' into JDK-8288899
>> - Merge branch 'openjdk:master' into JDK-8288899
>> - Merge branch 'openjdk:master' into JDK-8288899
>> - ... and 35 more: https://git.openjdk.org/jdk/compare/cdcc657e...585769c9
>
> src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 1823:
>
>> 1821: WorkQueue[] qs; int n;
>> 1822: if ((qs = queues) != null && (n = qs.length) > 0) {
>> 1823: for (int k = n, m = n - 1; ; id += 2) {
>
> @DougLea Might make sense to create a constant each for worker-queue stride and submission-queue stride so it becomes easier to reason about the `2` here.
There seem to be too many variants of queues array traversal loops to do this uniformly, but I did add some explanation:
* alternatives. Other loops over the queues array vary in origin
* and stride depending on whether they cover only submission
* (even) or worker (odd) queues or both, and whether they require
* randomness (in which case cyclically exhaustive strides may be
* used).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14301#discussion_r1299183118
More information about the core-libs-dev
mailing list