RFR: 8336479: Provide Process.waitFor(Duration) [v5]
Roger Riggs
rriggs at openjdk.org
Thu Jul 18 21:30:32 UTC 2024
On Thu, 18 Jul 2024 20:51:48 GMT, Naoto Sato <naoto at 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.
>
> Naoto Sato has updated the pull request incrementally with one additional commit since the last revision:
>
> removed a blank line
src/java.base/share/classes/java/lang/Process.java line 505:
> 503: public boolean waitFor(Duration duration) throws InterruptedException {
> 504: Objects.requireNonNull(duration, "duration");
> 505: return waitFor(TimeUnit.NANOSECONDS.convert(duration), TimeUnit.NANOSECONDS);
With this change, the update to ProcessTools is unnecessary and could be backed out.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20220#discussion_r1683527366
More information about the core-libs-dev
mailing list