On Mon, Nov 17, 2014 at 8:54 PM, David Holmes <david.hol...@oracle.com> wrote: > On 18/11/2014 2:43 PM, Martin Buchholz wrote: >> >> Proposed sibling change >> http://cr.openjdk.java.net/~martin/webrevs/openjdk9/UNIXProcess.waitFor/ >> - 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.