ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William Uther <will+...@cs.cmu.edu>
Subject Re: Threaded Ant?
Date Thu, 02 Mar 2000 00:41:36 GMT
Hi,
  If this is going to take any real discussion then it should wait till
everything else is sorted out.  I was hoping for a quick ok.

--Jose Alberto Fernandez <jofernan@us.oracle.com> wrote:
> William Uther wrote:
>> -- costin@eng.sun.com wrote:
>>> Problems with "variables"
>>> 
>>> - order of execution. You may run 2 targets in paralel (
>>> it's a reasonable thing - if you have a multiporcessor for example). In
>>> this case you need complex rules for variables.
>> 
>> Fair enough.  With threads this would not be hard to implement.  I assume
>> this would mean that the current ordering constraint on dependancies
>> would be removed:
>> 
>> From the Ant docs:
>>> Ant tries to execute the targets in the depends attribute in the order
>>> they appear (from left to right). Keep in mind that it is possible
>>> that a target can get executed earlier when an earlier target depends
>>> on it...
>> 
>> That constraint currently limits Ant to being serial, doesn't it?
> 
> You probably would need to add a property indicating that the target
> dependencies can be executed in parallel, or something like that.

Hmm.  I must admit to being confused as to why the ordering constraint is
there.  If you have a strict ordering constraint then you could enforce it
with a dependancy.  No target would be executed before the targets it
depends upon.  I would prefer to default to parallel.

I should add one exception.  I'd add an extra attribute to the <project>
tag which specifies the maximum number of parallel threads (not sure where
to set the default: 1 or infinite - have to play with it and see how it
works).  That way you you can set the maximum number of threads to reduce
resource contention if that is an issue.

Does anyone have any build files that depend upon this ordering?

\x/ill           :-}


Mime
View raw message