Skip to content

8345432: (ch, fs) Replace anonymous Thread with InnocuousThread#22697

Closed
bplb wants to merge 4 commits intoopenjdk:masterfrom
bplb:InnocuousThread-8345432
Closed

8345432: (ch, fs) Replace anonymous Thread with InnocuousThread#22697
bplb wants to merge 4 commits intoopenjdk:masterfrom
bplb:InnocuousThread-8345432

Conversation

@bplb
Copy link
Member

@bplb bplb commented Dec 12, 2024

Change internal instances of anonymous Threads to instances of InnocuousThread.


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
  • Change requires CSR request JDK-8346124 to be approved

Issues

  • JDK-8345432: (ch, fs) Replace anonymous Thread with InnocuousThread (Enhancement - P4)
  • JDK-8346124: (ch, fs) Replace anonymous Thread with InnocuousThread (CSR)

Reviewers

Reviewing

Using git

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

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

Using Skara CLI tools

Checkout this PR locally:
$ git pr checkout 22697

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

Using diff file

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

Using Webrev

Link to Webrev Comment

@bridgekeeper
Copy link

bridgekeeper bot commented Dec 12, 2024

👋 Welcome back bpb! 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.

@bplb
Copy link
Member Author

bplb commented Dec 12, 2024

The loopback connector thread in the Windows version of PipeImpl still uses an anonymous thread as it overrides interrupt() to do nothing.

@openjdk
Copy link

openjdk bot commented Dec 12, 2024

@bplb 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:

8345432: (ch, fs) Replace anonymous Thread with InnocuousThread

Reviewed-by: alanb

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 185 new commits pushed to the master branch:

As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details.

➡️ To integrate this PR with the above commit message to the master branch, type /integrate in a new comment.

@openjdk openjdk bot added the rfr Pull request is ready for review label Dec 12, 2024
@openjdk
Copy link

openjdk bot commented Dec 12, 2024

@bplb The following label will be automatically applied to this pull request:

  • nio

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 nio nio-dev@openjdk.org label Dec 12, 2024
@mlbridge
Copy link

mlbridge bot commented Dec 12, 2024

Webrevs

@bplb
Copy link
Member Author

bplb commented Dec 12, 2024

The loopback connector thread in the Windows version of PipeImpl still uses an anonymous thread as it overrides interrupt() to do nothing.

@AlanBateman , do you have any comment on this?

@AlanBateman
Copy link
Contributor

The loopback connector thread in the Windows version of PipeImpl still uses an anonymous thread as it overrides interrupt() to do nothing.

@AlanBateman , do you have any comment on this?

It's short lived so any inheritance isn't going to cause memory to be retained. On balance, it's probably best to convert this one while you are in the area, avoids questions in the future.

@bplb
Copy link
Member Author

bplb commented Dec 12, 2024

On balance, it's probably best to convert this one while you are in the area, avoids questions in the future.

It is not clear how to deal with interrupt() here as InnocuousThread is final. Something like

private boolean isInterruptible;

public void interrupt() {
    if (isInterruptible)
        super.interrupt();
}

does not seem like a good idea.

@openjdk openjdk bot added the csr Pull request needs approved CSR before integration label Dec 12, 2024
@bplb
Copy link
Member Author

bplb commented Dec 17, 2024

It's unclear to me whether the number of changes in aa5bb8a is worthwhile for this.

@openjdk openjdk bot added ready Pull request is ready to be integrated and removed csr Pull request needs approved CSR before integration labels Jan 6, 2025
@bplb
Copy link
Member Author

bplb commented Jan 6, 2025

/integrate

@openjdk
Copy link

openjdk bot commented Jan 6, 2025

Going to push as commit d723597.
Since your change was applied there have been 185 commits pushed to the master branch:

Your commit was automatically rebased without conflicts.

@openjdk openjdk bot added the integrated Pull request has been integrated label Jan 6, 2025
@openjdk openjdk bot closed this Jan 6, 2025
@openjdk openjdk bot removed ready Pull request is ready to be integrated rfr Pull request is ready for review labels Jan 6, 2025
@openjdk
Copy link

openjdk bot commented Jan 6, 2025

@bplb Pushed as commit d723597.

💡 You may see a message that your pull request was closed with unmerged commits. This can be safely ignored.

@bplb bplb deleted the InnocuousThread-8345432 branch January 9, 2025 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

integrated Pull request has been integrated nio nio-dev@openjdk.org

Development

Successfully merging this pull request may close these issues.

2 participants