On Mon, 14 Aug 2023 11:52:00 GMT, Doug Lea <d...@openjdk.org> wrote:

>> Addresses Jdk 8288899 : java/util/concurrent/ExecutorService/CloseTest.java 
>> failed with "InterruptedException: sleep interrupted" and related issues.
>> 
>> This is a major ForkJoin update (and hard to review -- sorry) that finally 
>> addresses incompatibilities between ExecutorService and ForkJoinPool (which 
>> claims to implement it), with the goal of avoiding continuing bug reports 
>> and incompatibilities. Doing this required reworking internal control to use 
>> phaser/seqlock-style versioning schemes (affecting nearly every method) that 
>> ensure consistent data structures and actions without requiring global 
>> synchronization or locking on every task execution that would massively 
>> degrade performance. The previous lack of a solution to this was the main 
>> reason for these incompatibilities.
>
> 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/c52f3bd1...585769c9

src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java line 442:

> 440:      * queues are at odd indices. Worker phase ids masked with SMASK
> 441:      * match their index. Shared (submission) queues are at even
> 442:      * indices. Grouping them together in this way simplifies and

@DougLea Interesting—so by having the worker queues at odd indices increases 
the likelihood of the then adjacent submission queues already having been 
prefetched?

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/14301#discussion_r1294661447

Reply via email to