On Thu, 30 Mar 2023 01:26:36 GMT, David Holmes <[email protected]> wrote:
>> Aleksey Shipilev has updated the pull request with a new target base due to
>> a merge or a rebase. The pull request now contains ten commits:
>>
>> - Merge branch 'master' into JDK-83050920-thread-sleep-subms
>> - Work
>> - Draft work
>> - Merge branch 'master' into JDK-83050920-thread-sleep-subms
>> - Merge branch 'master' into JDK-83050920-thread-sleep-subms
>> - More fixes
>> - Fix Windows yet again
>> - Helper method should be inline, not static
>> - Work
>
> src/hotspot/share/runtime/javaThread.cpp line 1981:
>
>> 1979: }
>> 1980:
>> 1981: bool JavaThread::sleep(jlong millis, jint nanos) {
>
> You don't need the overloads at this level - the incoming call should always
> have millis and nanos, even if nanos is zero.
I think the distinction between millis and nanos makes our life unnecessarily
hard here. `jlong nanos` is already quite big for practical uses, and so we can
simplify this code by only passing `nanos` around. In new revision, I still do
two overloads to avoid "unit" mistakes.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13225#discussion_r1170390101