ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Klaus Malorny <Klaus.Malo...@knipp.de>
Subject Re: AW: AW: extended parallelism
Date Wed, 19 Dec 2007 18:29:16 GMT
Jan.Materne@rzf.fin-nrw.de wrote:

> Usually tasks have to be processed sequentially.
>    <mkdir dir="${classes}"/>
>    <javac todir="${classes}".../>
> 
>    <tstamp/>
>    <jar destfile="${ant.project.name}-${dstamp}.jar" .../>
> 
> 
> Jan
>

Sure, but you can regard the body of a target as having an implicit <sequential> 
block.

e.g.

<target name="a">
   <taska1/>
   <taska2/>
   <taska3/>
</target>

<target name="b">
   <taskb1>
   <parallel>
     <taskb2>
     <taskb3>
   </parallel>
</target>

<target name="c" depends="a, b">
   <taskc1>
   <taskc2>
</target>

you'll get the following dependencies among the _tasks_:

taska1: -none-
taska2: taska1
taska3: taska2

taskb1: -none-
taskb2: taskb1
taskb3: taskb1

taskc1: taska3, taskb2, taskb3
taskc2: taskc1

For example, if you limit the number of concurrently executed threads to 2, and 
assume that taska1 takes much longer than whole target "b", then taskb2 and 
taskb3 would not run concurrently, as otherwise the total number of running 
threads would exceed. I hope that this makes my point clearer.

Klaus

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message