RFR 9: 8064932: test java/lang/ProcessBuilder/Basic.java: waitFor didn't take long enough
Martin Buchholz
martinrb at google.com
Wed Nov 19 18:15:43 UTC 2014
Now I'm reduced to super-nitpicks: There are a couple of extraneous SPACES here:
+ long msTimeout =
TimeUnit.NANOSECONDS.toMillis(remainingNanos + 999_999L);
+ } while (remainingNanos > 0);
On Wed, Nov 19, 2014 at 10:04 AM, roger riggs <roger.riggs at oracle.com> wrote:
>> With the "deadline" style of checking, variable remainingNanos becomes
>> unnecessary, and you can just do
>>
>> do { ... } while (deadline - System.nanoTime() > 0)
>
> No really expendable, the remainingNanos value is needed for the wait() call
> on the retry.
Ohh .... right you are!
More information about the core-libs-dev
mailing list