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

ManagedThreadFactory javadoc and spec discrepancy regarding ManageableThread #32

Open
glassfishrobot opened this issue Sep 13, 2013 · 4 comments

Comments

@glassfishrobot
Copy link

Section 3.4.4 of the spec says:
Threads returned by the newThread() method must implement the ManageableThread interface.

but javadoc says:
Threads returned from the newThread() method should implement the ManageableThread interface.

The spec is correct. The javadoc needs to be updated to say
Threads returned from the newThread() method must implement the ManageableThread interface.

Affected Versions

[1.0]

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
Reported by alai8

@glassfishrobot
Copy link
Author

@glassfishrobot Commented
This issue was imported from java.net JIRA CONCURRENCY_EE_SPEC-32

@glassfishrobot
Copy link
Author

@njr-11
Copy link
Contributor

njr-11 commented May 15, 2023

The requirement to implement ManageableThread will not be achievable when creating virtual threads. Java requires a Thread.Builder to create virtual threads (or Thread.startVirtualThread which is defined as delegating to the builder via Thread.ofVirtual()) and seals the Thread.Builder interface to enforce that the only builders permitted are Thread.Builder.OfPlatform or Thread.Builder.OfVirtual which do not allow adding the ManageableThread interface to the Thread implementation class.

So in addition to fixing the existing inconsistency in the spec, we will also need to do something like qualifying the requirement as being for platform threads only.

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

No branches or pull requests

2 participants