8385830: ForkJoinTask#get may swallow caller thread's interrupt flag#31376
8385830: ForkJoinTask#get may swallow caller thread's interrupt flag#31376viktorklang-ora wants to merge 1 commit into
Conversation
…ing the thread waiting for the result sometimes leads to a lost interruption
|
/contributor add @DougLea |
|
👋 Welcome back vklang! A progress list of the required criteria for merging this PR into |
|
❗ This change is not yet ready to be integrated. |
|
@viktorklang-ora |
|
@viktorklang-ora The following label will be automatically applied to this pull request:
When this pull request is ready to be reviewed, an "RFR" email will be sent to the corresponding mailing list. If you would like to change these labels, use the /label pull request command. |
| public void testCallerInterruptedDuringSubmit() throws InterruptedException, ExecutionException { | ||
| final Thread submitter = Thread.currentThread(); | ||
| final ExecutorService p = new ForkJoinPool(1); | ||
| try (PoolCleaner cleaner = cleaner(p)) { |
There was a problem hiding this comment.
As ExecutorService extends AutoCloseable then I assume PoolCleaner is not needed here.
There was a problem hiding this comment.
Good question. I'm following the convention in the test file: https://github.com/openjdk/jdk/pull/31376/changes/BASE..0231ed9e9cb2041a3bf5c7ef5e32c22ddecf93db#diff-cf95a2f5a26f4a620d0c7ed6525dba84aeaea5e88b1c382900869d0f265ed367R689
Addresses the reported lost interrupt.
Progress
Issue
Contributors
<dl@openjdk.org>Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/31376/head:pull/31376$ git checkout pull/31376Update a local copy of the PR:
$ git checkout pull/31376$ git pull https://git.openjdk.org/jdk.git pull/31376/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 31376View PR using the GUI difftool:
$ git pr show -t 31376Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/31376.diff
Using Webrev
Link to Webrev Comment