RFR 9: 8064932: test java/lang/ProcessBuilder/Basic.java: waitFor didn't take long enough
martinrb at google.com
Tue Nov 18 16:08:33 UTC 2014
On Mon, Nov 17, 2014 at 8:54 PM, David Holmes <david.holmes at oracle.com> wrote:
> On 18/11/2014 2:43 PM, Martin Buchholz wrote:
>> Proposed sibling change
>> - don't unconditionally call nanoTime when the wait ends
>> - use the millis/nanos form of Object.wait in case sub-millisecond
>> waits are ever supported.
> I don't really see the point of adding the extra math, plus an extra call
> (the two arg wait will call the one arg version) for no actual gain.
The idea was to code to the Object.wait API, not its current
implementation with only millisecond resolution.
Even if we code to the current implementation, we should round UP not down,
to avoid the problem of needing to call wait twice in case of early return.
That would also be progress.
> If you want to add a fast exit path that's fine but the rest seems
> superfluous to me.
More information about the core-libs-dev