On Fri, 1 Jul 2022 20:01:48 GMT, Ryan Ernst <d...@openjdk.org> wrote:

> This is a followup to simplify Shutdown.exit after the removal of
> finalizers (https://bugs.openjdk.org/browse/JDK-8198250). Once agreement
> on the approach has been reached in this PR, a CSR will be filed to
> propose the spec change to Runtime.exit.

Sorry, I did not think this issue was intended to change the specification in 
any way, but I see now that it actually does - whether that was the intent or 
not.

src/java.base/share/classes/java/lang/Runtime.java line 88:

> 86:      * <p> Invocations of this method block indefinitely. It is therefore
> 87:      * inadvisable to invoke this method from a shutdown hook as it will
> 88:      * cause deadlock.

This is inaccurate. The method only blocks indefinitely when shutdown has 
already commenced.

-------------

PR: https://git.openjdk.org/jdk/pull/9351

Reply via email to