On Mon, 27 Feb 2023 23:20:07 GMT, Roger Riggs <rri...@openjdk.org> wrote:
>> I can't tell if the thread identity will be included in the log the message? >> >> I'm not so sure it is useful to allow competing exit calls to all log their >> intent. I would have kept the logging itself inside the locked region as per >> the original code. > > The main diagnostic is the logged message with the stack trace. The println > version is present as a diagnostic if logging is mis-configured. > > If the developer is looking to mitigate calls to Runtime.Exit, then they are > advised to check all paths and will appreciate not having to wait for a > different thread to win the race. But does that logging include the thread identity? If multiple threads can race to exit and all log, then the developer/user needs to know which logging came from which thread. ------------- PR: https://git.openjdk.org/jdk/pull/12770