RFR 9: 8064932: test java/lang/ProcessBuilder/Basic.java: waitFor didn't take long enough
roger riggs
roger.riggs at oracle.com
Wed Nov 19 18:47:08 UTC 2014
Hi Martin,
I'll take that as an approval.
We've got to work on the efficiency of this collaborative
pair-programming. ;-)
Thanks, Roger
On 11/19/2014 1:15 PM, Martin Buchholz wrote:
> 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