ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@cortexebusiness.com.au>
Subject Re: Introduction of Multithreading
Date Wed, 25 Jul 2001 12:51:37 GMT
----- Original Message -----
From: "Stefan Bodewig" <bodewig@apache.org>
>
> Interesting question is, which task should get to read from standard
> input if several tasks run in parallel ...  Maybe all of them?
>
> Providing input to tasks is a different beast in that you may want to
> have the GUI pop up a dialog to ask for input instead of falling back
> to standard input.
>

What I had thought of in mutant was a InputProvider interface. It was
really only designed for <prompt> style input, which I think wouldn't be a
bad start. Different front ends could provide different InputProviders, so
that some task isn't trying to read from System.In when running Ant as part
of a GUI. I thought of a few providers
UnattendedInputProvider - just returns with no input
CommandLineInputProvider - basic read from System.in
DialogInputProvider - AWT dialog
etc, etc

The CommandLine version would be synchronized so that multiple threads
would queue up to get input.

A general demuxInputStream sitting on System.in might send out to this
input provider.

Anyway, just thoughts at this stage.

Conor




Mime
View raw message