Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-07 Thread David Holmes
On Tue, 5 Jul 2022 04:51:50 GMT, Ryan Ernst wrote: >> YAO (Yet Another Opinion)! But I think we're actually converging. >> >> David's wording: >>>Invocations of this method are serialized such that only one invocation will >>>actually proceed with the shutdown sequence and terminate the VM

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-06 Thread Ryan Ernst
On Mon, 4 Jul 2022 16:47:28 GMT, Chris Hegarty wrote: >> I think the wording in the latest commit (9d972b) is problematic. One reason >> is that you've changed it to "will run shutdown hooks" but it doesn't run >> the hooks, it starts them, and so conflicts with the previous paragraph. I >>

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-06 Thread Chris Hegarty
On Tue, 5 Jul 2022 07:23:49 GMT, David Holmes wrote: >> I like the new suggested wording, but I would slightly tweak it. As Alan >> mentioned in another comment the first paragraph makes clear the method >> never returns normally. How does the following sound? >> >>> If this method is invoked

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-05 Thread Chris Hegarty
On Mon, 4 Jul 2022 16:31:22 GMT, Alan Bateman wrote: >> I reworded with the suggested text in mind. I also added another sentence >> referencing native signal handlers, which may also initiate shutdown. I >> think this clarification is important so that it is clear the status code of >> all

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-05 Thread Alan Bateman
On Mon, 4 Jul 2022 16:13:10 GMT, Ryan Ernst wrote: >> David's refinement looks good. The sentence on deadlock is accurate as >> shutdown hooks run on other threads, not the thread calling System.ext. > > I reworded with the suggested text in mind. I also added another sentence > referencing

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-04 Thread Ryan Ernst
On Mon, 4 Jul 2022 08:42:02 GMT, Alan Bateman wrote: >> +1 - except for the "deadlock" part (see other comment). I think the old >> paragraph is at least confusing, and perhaps even just wrong. Let's say >> we've run `shutdown` so run all the hooks but not halted. Then someone >> calls

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-04 Thread David Holmes
On Sat, 2 Jul 2022 21:21:37 GMT, Ryan Ernst 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

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-04 Thread David Holmes
On Mon, 4 Jul 2022 08:07:25 GMT, Chris Hegarty wrote: >> src/java.base/share/classes/java/lang/Runtime.java line 89: >> >>> 87: * of the first invocation will be used; the status codes from >>> other invocations >>> 88: * will be ignored. If this method is invoked from a shutdown

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-04 Thread Alan Bateman
On Mon, 4 Jul 2022 01:59:37 GMT, Kim Barrett wrote: >> src/java.base/share/classes/java/lang/Runtime.java line 89: >> >>> 87: * of the first invocation will be used; the status codes from >>> other invocations >>> 88: * will be ignored. If this method is invoked from a shutdown hook

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-04 Thread Chris Hegarty
On Mon, 4 Jul 2022 01:57:11 GMT, Kim Barrett wrote: > Is "deadlock" accurate? Yes. In the context of the specification, "shutdown hook" means _application_ shutdown hook - as far as the specification is concerned, application shutdown hooks are the only kind of hooks. Right? For example,

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-04 Thread Kim Barrett
On Sat, 2 Jul 2022 21:21:37 GMT, Ryan Ernst 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

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-04 Thread Kim Barrett
On Sun, 3 Jul 2022 22:19:50 GMT, David Holmes wrote: >> Ryan Ernst has updated the pull request incrementally with one additional >> commit since the last revision: >> >> better clarify multiple threads behavior > > src/java.base/share/classes/java/lang/Runtime.java line 89: > >> 87: *

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-03 Thread David Holmes
On Sat, 2 Jul 2022 21:21:37 GMT, Ryan Ernst 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

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-02 Thread kristylee88
On Sat, 2 Jul 2022 21:21:37 GMT, Ryan Ernst 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

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-02 Thread Ryan Ernst
On Sat, 2 Jul 2022 19:32:04 GMT, Alan Bateman wrote: >> If a shutdown hook is running, then shutdown has started, right? This new >> wording isn’t really a change, it’s the current behavior (the “otherwise” >> portion of the old wording). But the wording is meant to be more accurate >> for

Re: RFR: 8288984: Simplification in Shutdown.exit [v2]

2022-07-02 Thread Ryan Ernst
> 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. Ryan Ernst has updated the pull request