On Fri, 26 Aug 2022 23:15:42 GMT, Stuart Marks <sma...@openjdk.org> wrote:
>> The concept of the shutdown sequence needs to be specified more clearly. >> This PR adds text for this into the class specification of >> `java.lang.Runtime`. Also includes adjustments to related areas in >> `addShutdownHook`, `halt`, and in the `System` and `Thread` classes. The >> changes here should coordinate with similar changes to JLS 12.8, JVMS 5.7, >> and the Invocation API chapter of the _JNI Specification._ > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Minor adjustments src/java.base/share/classes/java/lang/Thread.java line 70: > 68: * The newly started thread invokes the task's {@link Runnable#run() run} > method. > 69: * > 70: * <p> A platform thread <i>terminates</i> if either its {@code run} > method completes I don't think the update in 9796557d works. It switches to talking about the termination of platform threads before we've introduced what a platform thread is. It also switches to talking about the Thread.run method when the focus in the previous paragraph has been the the task that the thread executes. If we really need this here then the second paragraph will need to explain that it is also possible to extend Thread and override the run method. ------------- PR: https://git.openjdk.org/jdk/pull/9437