Skip to content
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

hint to request virtual threads #349

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

njr-11
Copy link
Contributor

@njr-11 njr-11 commented Sep 28, 2023

fixes #268

This pull adds the virtual=true hint to request the use of virtual threads to ManagedThreadFactoryDefinition, ManagedExecutorDefinition, and ManagedScheduledExecutorDefinition. The default is false.

Regarding the discussion on the name of the attribute, virtual is used because it matches the terminology and hard-coded method names of the java.lang.Thread API, which has methods like isVirtual and ofVirtual.

@njr-11 njr-11 added the enhancement New feature or request label Sep 28, 2023
@njr-11 njr-11 added this to the 3.1 milestone Sep 28, 2023
@mswatosh mswatosh self-requested a review October 3, 2023 23:31
Copy link
Member

@mswatosh mswatosh left a comment

Choose a reason for hiding this comment

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

The wording for the virtual hint is good, so no functional changes requested.

Copyright header on ManagedThreadFactoryDefinition.java should be updated to include 2023.

@njr-11
Copy link
Contributor Author

njr-11 commented Oct 4, 2023

The wording for the virtual hint is good, so no functional changes requested.

Copyright header on ManagedThreadFactoryDefinition.java should be updated to include 2023.

Thanks for spotting that. The copyright is corrected in 0e2c9eb

Copy link
Contributor

@aubi aubi left a comment

Choose a reason for hiding this comment

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

I agree with the changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Loom Virtual Threads
3 participants