ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject Re: Possible bug with <parallel>, <antcall> and depends
Date Fri, 03 May 2002 03:42:11 GMT

----- Original Message -----
From: "Chad Loder" <>
To: "Ant Developers List" <>
Sent: Thursday, May 02, 2002 00:08
Subject: Re: Possible bug with <parallel>, <antcall> and depends

> At Wednesday 5/1/2002 10:28 PM -0700, you wrote:

> >All <parallel> does is run tasks in parallel. That's it. no
> >no-coordination. It is not a parallel make a-la- clearmake. Now, as an
> >of a two-cpu system sometimes I'd like better intrinsic parallelisation,
> >whenever I start to think that I remember to set build.compiler=jikes and
> >problems go away
> The choice of compiler has no bearing on what I'm saying. I have
> separate, completely independent subprojects (with their own,
> independent source directories) which need building.  I would
> like their mutual dependencies to get built at most one time,
> as per statement (1) from the ant docs:

Actually it has a lot to do with it: move over to jikes and for any moderate
sized app your build time speeds up so much that parallelization is not
worth the hassle

> "Ensuring that tasks within threads do not interact" is not the same
> as "Ensuring that tasks within threads do not share mutual
> dependencies, even though the tasks themselves are independent."

> Actually, I can't imagine that <parallel> is widely found even to
> be useful for building anything! In fact I just did a check
> through the jakarta-ant, jakarta-commons, junit, and xerces build files
> and found only one use of <parallel>, and this was to run unit tests.


> I couldn't possibly replace our rather large build system (implemented
> in GNU make) with ant until ant supports parallel builds. I'm a rather
> handy Java programmer myself and I don't mind writing a taskdef for
> "transitive closure" parallelism. However, I'm rapidly getting the
> impression that this style of build is contrary to the spirit of
> ant for some reason, and I'd obviously like whatever I design to be
> acceptable to the ant maintainers. Any thoughts from you ant people
> out there? Has work already been done in this area?

dont try and re-implement a makefile literally in ant; it doesnt work

Parallel builds only really work in large apps. You need them in a make cos
you recurse all down the tree calling sub builds. In ant you can get away
with very few build files, so there is less of a need.

so, if you do want to use parallel, call external build files that dont
state their dependencies.

also..check out anthill and cruisecontrol for a continuous build process,
one that does background builds all
the time.


thinking a bit, and opening up to the rest of the mail list, should we make
Project.setNewProperty() synchronized on anything. Seems to me that a test
followed by an assign leads to a race condit in parallel.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message