Would be nice to have some kind of "async" process I/O streaming. And an event mechanism to receive notifications when the process terminates or input is available from stdout/stderr.
> Am 25.03.2014 um 09:45 schrieb Kasper Nielsen <kaspe...@gmail.com>: > > On Mon, Mar 24, 2014 at 10:11 PM, roger riggs <roger.ri...@oracle.com>wrote: > >> Hi, >> >> I'm starting to work on JEP 102, Process API Updates for JDK 9. >> >> Are there use cases for which this is insufficient? Please comment. > What about a non-blocking waitFor mechanism such as > > void onTerminate(IntConsumer consumer) or > CompletionStage<Integer> onTerminate(); > > Would be useful for spawning many small processes. > > > Also a waitFor method taking a timeout parameter. So you, for example, can > wait for the subprocess to exit within 10 seconds. And if not kill it. > > - Kasper