Process API Updates (JEP 102)
snazy at snazy.de
Tue Mar 25 08:56:00 UTC 2014
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 <kasperni at gmail.com>:
> On Mon, Mar 24, 2014 at 10:11 PM, roger riggs <roger.riggs at oracle.com>wrote:
>> 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
More information about the core-libs-dev