On Wed, 21 Aug 2024 11:10:22 GMT, Alan Bateman <[email protected]> wrote:
>> Unfortunately there is no good, deterministic reproducer which can be used
>> as a regression test at this point in time.
>
> src/java.base/share/classes/java/util/concurrent/ScheduledThreadPoolExecutor.java
> line 533:
>
>> 531: */
>> 532: long triggerTime(long delay) {
>> 533: return System.nanoTime() + Math.min(delay, MAX_NANOS);
>
> The hi-res time source could have any long value so I'm wondering if it's
> okay for triggerTime to be negative.
System.nanoTime can be negative anyway (and only checked by subtraction). So
this should be OK.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20653#discussion_r1725256010