On Wed, 17 Jul 2024 17:36:29 GMT, Naoto Sato <na...@openjdk.org> wrote:
> Proposing a new overload method for `Process#waitFor()` which takes a > `Duration` for the timeout value. This will reduce the possibility for making > mistakes with the `TimeUnit` in the other overload method. A corresponding > CSR has also been drafted. src/java.base/share/classes/java/lang/Process.java line 504: > 502: return false; > 503: > 504: return waitForNanos(TimeUnit.NANOSECONDS.convert(duration)); `waitFor` can be overridden by pre-24 subclasses to provide a better implementation while `waitForNanos` couldn't. Is it reasonable for our default implementation to delegate to `waitFor(long, TimeUnit)` that existing user classes have better implementations for? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20220#discussion_r1681464947