Re: RFR: 8288984: Simplification in java.lang.Runtime::exit [v2]

2022-07-08 Thread Kim Barrett
On Thu, 7 Jul 2022 08:03:52 GMT, David Holmes wrote: > > I think that isn't true. If a hook doesn't terminate then VM.shutdown > > doesn't get called, so the window never gets cracked opened to call halt > > directly. > > @kimbarrett Any thread can call halt() directly while the attempted shut

Re: RFR: 8288984: Simplification in java.lang.Runtime::exit [v2]

2022-07-07 Thread David Holmes
On Tue, 5 Jul 2022 21:56:27 GMT, Kim Barrett wrote: > I think that isn't true. If a hook doesn't terminate then VM.shutdown doesn't > get called, so the window never gets cracked opened to call halt directly. @kimbarrett Any thread can call halt() directly while the attempted shutdown is in p

Re: RFR: 8288984: Simplification in java.lang.Runtime::exit [v2]

2022-07-07 Thread Kim Barrett
On Mon, 4 Jul 2022 12:09:46 GMT, David Holmes 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. Rig

Re: RFR: 8288984: Simplification in java.lang.Runtime::exit [v2]

2022-07-07 Thread Chris Hegarty
On Mon, 4 Jul 2022 12:19:27 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 > >> Let's say we've run shutdown so run all the hooks but not halted. Then >> s

Re: RFR: 8288984: Simplification in java.lang.Runtime::exit [v2]

2022-07-06 Thread Kim Barrett
On Mon, 4 Jul 2022 12:19:27 GMT, David Holmes wrote: > > Let's say we've run shutdown so run all the hooks but not halted. Then > > someone calls exit(0). That seems to suggest the call will block > > indefinitely, which is neither desirable nor what was actually implemented. > > If the hook t

Re: RFR: 8288984: Simplification in java.lang.Runtime::exit [v2]

2022-07-05 Thread Ryan Ernst
On Mon, 4 Jul 2022 12:19:27 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 > >> Let's say we've run shutdown so run all the hooks but not halted. Then >> s