Open glassfishrobot opened 11 years ago
@glassfishrobot Commented Reported by alai8
@glassfishrobot Commented This issue was imported from java.net JIRA CONCURRENCY_EE_SPEC-32
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.
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]