Skip to content

8385830: ForkJoinTask#get may swallow caller thread's interrupt flag#31376

Open
viktorklang-ora wants to merge 1 commit into
openjdk:masterfrom
viktorklang-ora:8385830
Open

8385830: ForkJoinTask#get may swallow caller thread's interrupt flag#31376
viktorklang-ora wants to merge 1 commit into
openjdk:masterfrom
viktorklang-ora:8385830

Conversation

@viktorklang-ora
Copy link
Copy Markdown
Contributor

@viktorklang-ora viktorklang-ora commented Jun 3, 2026

Addresses the reported lost interrupt.



Progress

  • Change must be properly reviewed (1 review required, with at least 1 Reviewer)
  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue

Issue

  • JDK-8385830: ForkJoinTask#get may swallow caller thread's interrupt flag (Bug - P3)

Contributors

  • Doug Lea <dl@openjdk.org>

Reviewing

Using git

Checkout this PR locally:
$ git fetch https://git.openjdk.org/jdk.git pull/31376/head:pull/31376
$ git checkout pull/31376

Update a local copy of the PR:
$ git checkout pull/31376
$ git pull https://git.openjdk.org/jdk.git pull/31376/head

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 31376

View PR using the GUI difftool:
$ git pr show -t 31376

Using diff file

Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/31376.diff

Using Webrev

Link to Webrev Comment

…ing the thread waiting for the result sometimes leads to a lost interruption
@viktorklang-ora
Copy link
Copy Markdown
Contributor Author

/contributor add @DougLea

@bridgekeeper
Copy link
Copy Markdown

bridgekeeper Bot commented Jun 3, 2026

👋 Welcome back vklang! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request. There are additional pull request commands available for use with this pull request.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Jun 3, 2026

❗ This change is not yet ready to be integrated.
See the Progress checklist in the description for automated requirements.

@openjdk
Copy link
Copy Markdown

openjdk Bot commented Jun 3, 2026

@viktorklang-ora
Contributor Doug Lea <dl@openjdk.org> successfully added.

@openjdk openjdk Bot added the core-libs core-libs-dev@openjdk.org label Jun 3, 2026
@openjdk
Copy link
Copy Markdown

openjdk Bot commented Jun 3, 2026

@viktorklang-ora The following label will be automatically applied to this pull request:

  • core-libs

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.

@openjdk openjdk Bot added the rfr Pull request is ready for review label Jun 3, 2026
@mlbridge
Copy link
Copy Markdown

mlbridge Bot commented Jun 3, 2026

Webrevs

public void testCallerInterruptedDuringSubmit() throws InterruptedException, ExecutionException {
final Thread submitter = Thread.currentThread();
final ExecutorService p = new ForkJoinPool(1);
try (PoolCleaner cleaner = cleaner(p)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As ExecutorService extends AutoCloseable then I assume PoolCleaner is not needed here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core-libs core-libs-dev@openjdk.org rfr Pull request is ready for review

Development

Successfully merging this pull request may close these issues.

2 participants