RFR: 8304939: os::win32::exit_process_or_thread should be marked noreturn [v3]
David Holmes
dholmes at openjdk.org
Fri Oct 27 04:23:29 UTC 2023
On Thu, 26 Oct 2023 04:23:42 GMT, Julian Waters <jwaters at openjdk.org> wrote:
>> src/hotspot/os/posix/os_posix.cpp line 894:
>>
>>> 892: sleep: // sleep forever ...
>>> 893: ::sleep(100); // ... 100 seconds at a time
>>> 894: goto sleep;
>>
>> I don't recall now why this was written the way it was, but I certainly do not understand why you rewrote it this way with a goto!
>
> ah, when I was searching for functions to implement the noreturn with and stumbled across this one, I thought it could do with a goto instead of a while true since the intent seemed to be clearer. I can revert this if need be
Please revert - `while (true)` conveys the exact intent.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16303#discussion_r1374055747
More information about the hotspot-dev
mailing list