On Thu, 4 Aug 2022 03:09:09 GMT, Stuart Marks <sma...@openjdk.org> wrote:
>> Initial edits to addShutdownHook from Alex. >> >> See [JDK-8290036](https://bugs.openjdk.org/browse/JDK-8290036). > > Stuart Marks has updated the pull request incrementally with one additional > commit since the last revision: > > Updates after conversation with Alan: > - specify that starting a shutdown hook explicitly has an unspecified > effect on the shutdown sequence > - link Thread class doc to shutdown sequence > - link to Thread.UncaughtExceptionHandler > - clarify that only live non-daemon threads are significant > - use "thread termination" to conform to the text in the Thread class > - adjust line breaks and whitespace src/java.base/share/classes/java/lang/Thread.java line 101: > 99: * the shutdown sequence from commencing. Invoking the {@linkplain > Runtime#exit(int)} > 100: * method will start the shutdown sequence regardless of whether > non-daemon threads > 101: * are still running. Future down, in the "Virtual threads" section we have "Virtual threads are daemon threads and so do not prevent the Java virtual machine from terminating". That will need to be updated too to say that it they do not prevent the shutdown sequence from commencing. ------------- PR: https://git.openjdk.org/jdk/pull/9437