Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 30386 invoked by uid 500); 13 Jun 2001 12:03:45 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 30233 invoked from network); 13 Jun 2001 12:03:43 -0000 From: "Jose Alberto Fernandez" To: Subject: RE: executing task for each file in file set Date: Wed, 13 Jun 2001 13:05:40 +0100 Message-ID: <00e401c0f401$2aa7d280$da76883e@viquity.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook CWS, Build 9.0.2416 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N > From: Stefan Bodewig [mailto:bodewig@apache.org] > > Peter Vogel wrote: > > > Except that "parallel" in the sense of execOn simply says that it's > > ok to provide the whole fileset to the command at once, rather than > > running the command for each file. > > Or "apply the command to the whole set instead of each member in some > arbitrary iteration sequence". > I think one of our worst decitions was to use "parallel" for the name of that attribute. It was a very bad choice of terms, and confusing to say the least. > > The same thing could be achieved if there were a way to get a string > > representation of a fileset > > We will have one in Ant2 . > > But you could only achieve the same as execon does if this string > representation is a space delimited list of absolute pathnames - not > the only reasonable choice for FileSet.toString(). > I think this is the wrong approach because it puts too much dependency on surface syntax which can be OS dependant or what have you. A more better approach on my opinion would be to require the replaced attribute to be an of some sort, that would mean that a "allatonce" foreach will require the argument be substituted to be define as an which can be instantiated multiple times. That would leave the decision of how to combine the set of arguments toguether to the , which is the only one that needs to know this. > > I agree though, it would be interesting to have a "true" parallel > > attribute, > > Yes it would - but it would be quite dangerous if the tasks nested > into foreach (or whatever) have not been designed to be thread save. > We could have a marker interface, that users can implement to indicate the task is parallelizable: public interface Parallelizable {}; If the task does not implement the interface, then sequential execution is enforzed. One could think of having methids on theis interface that allow you different degrees of parallelism. Just thoughts, Jose Alberto > Stefan >