Hi,
The Process and ProcessHandle API javadoc has been updated with the comments
and suggestions including the loose coupling of the Process from the
CompletableFutures
that are linked to process termination.
The improved implementation from Peter is incorporated and the method
descriptions
updated to reflect its behavior.
Updated javadoc: http://cr.openjdk.java.net/~rriggs/ph-apidraft/
I ran into a issue with the generics on CompletableFuture<? extends...>
completableFuture()
in ProcessHandle and Process.
The JDK compiles fine but the javac has a problem with the assignment in
a test.
I'll come back to it after a long weekend in a warmer climate.
Suggestions appreciated, Roger
p.s.
ws/jdk9-sandbox/jdk/test/java/lang/ProcessHandle/CompletionTest.java:67:
error: incompatible types: CompletableFuture<CAP#1> cannot be converted
to CompletableFuture<Process>
CompletableFuture<Process> future = p.completableFuture();
^
where CAP#1 is a fresh type-variable:
CAP#1 extends ProcessHandle from capture of ? extends ProcessHandle