On Thu, 1 Sep 2022 06:31:11 GMT, David Holmes <[email protected]> wrote:
>> There are subtle differences (invoking a virtual Thread's run method
>> directly does no nothing) but that is too much detail and would confusing to
>> say anything about in the introduction paragraphs.
>>
>> The following is closer to what I think we should have. The existing
>> paragraph 2 describes starting a thread so this is where the Thread.run
>> method is introduced. Paragraph 3 follows to describe termination.
>>
>>
>> * <p> {@code Thread} defines constructors and a {@link Builder} to create
>> threads.
>> * {@linkplain #start() Starting} a thread schedules it to execute its
>> {@link #run() run}
>> * method. The newly started thread executes concurrently with the thread
>> that caused
>> * it to start.
>> *
>> * <p> A thread <i>terminates</i> if either its {@code run} method completes
>> normally,
>> * or if its {@code run} method completes abruptly and the appropriate
>> {@linkplain
>> * Thread.UncaughtExceptionHandler uncaught exception handler} completes
>> normally or
>> * abruptly. With no code left to run, the thread has completed execution.
>> Thread
>> * defines the {@link #join() join} method to wait for a thread to terminate.
>
> That sounds reasonable to me.
OK, I've applied Alan's suggestion with slight edits.
-------------
PR: https://git.openjdk.org/jdk/pull/9437