-
Notifications
You must be signed in to change notification settings - Fork 6.3k
8288899: java/util/concurrent/ExecutorService/CloseTest.java failed with "InterruptedException: sleep interrupted" #14301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a large update to fix a really hard problem. I've been testing and running with these changes on and off for several months and they are stable now. The code is very dense and hard to read but the description at a top is very good/helpful.
The API changes are okay. The source compatibility issue with dropping the override of the invokeAll combinator is unfortunate but combined with everything else it means that FJP now implements the ES contract and can work as a replacement for say TPE.
So I think this changes are good to go.
ns = nanos - (System.nanoTime() - startTime); | ||
} | ||
} | ||
for (int i = futures.size() - 1; i >= 0; --i) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DougLea Might not be necessary for performance, but using an ArrayDeque and using pollLast()
might be cleaner?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was a good enough idea that I started doing it until realizing/remembering that ArrayDeque doesn't implement List so can't be used here (without making a copy). Oh well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@DougLea Ouch—I completely missed that it is also returned. Apologies :(
I gave the PR a final review just now, there was a few questions which might not warrant any changes. I concur with the assessment that these changes should be good to go. |
@DougLea This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been no new commits pushed to the ➡️ To integrate this PR with the above commit message to the |
@DougLea this pull request can not be integrated into git checkout JDK-8288899
git fetch https://git.openjdk.org/jdk.git master
git merge FETCH_HEAD
# resolve conflicts and follow the instructions given by git merge
git commit -m "Merge master"
git push |
src/java.base/share/classes/java/util/concurrent/ForkJoinPool.java
Outdated
Show resolved
Hide resolved
/integrate |
Going to push as commit 667cca9.
Your commit was automatically rebased without conflicts. |
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.
Progress
Issues
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/14301/head:pull/14301
$ git checkout pull/14301
Update a local copy of the PR:
$ git checkout pull/14301
$ git pull https://git.openjdk.org/jdk.git pull/14301/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 14301
View PR using the GUI difftool:
$ git pr show -t 14301
Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/14301.diff
Webrev
Link to Webrev Comment