ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "McNamara, Sean (Contractor)" <>
Subject RE: Ant 1.3 sequence of tasks but would like concurrent?
Date Fri, 15 Jun 2001 15:11:38 GMT
Thanks for your response Stefan.  Yes, the misuse of TASK for TARGET was a
mistake, and if my description wasn't correct, my impression of the v2.0
mutlithreading (based on your description) was.

Question:  Since multithreading of targets as you've described it still
wouldn't address the issue of executing completely standalone, non-returning
processes, is this something that will be addressed in another way?

In particular, I'm looking for a way to launch a process like an application
server, that requires a JVM, but whose JVM never exits (weblogic being a
good example.)  This can be done by writing a shell script to launch the
application server as a background process, but doing so ties the build to
the platform for which the launch script was written.  Is there a planned
way to give users this ability, or is there already some way to do this that
I'm simply not understanding?

Thanks for your help!

-----Original Message-----
From: Stefan Bodewig []
Sent: Friday, June 15, 2001 1:55 AM
Subject: Re: Ant 1.3 sequence of tasks but would like concurrent?

Please refer to the commented version
<> instead of the
"raw" <> when
searching for explanations 8-)

Sean McNamara <> wrote:

> My understanding is that multiple commnads within a task will be
> multithreaded, the multiple threads will be joined at the end of the
> containing task.

"within a target", not "whithin a task" - and only if you ask for it.

> <task name="startAllServers" multithread="yes">
>    <startServer name="server1" ... />
>    <startServer name="server2" ... />
>    <startServer name="server3" ... />
> </task>

Probably more something like 

<target name="startAllServers">
    <startServer name="server1" ... />
    <startServer name="server2" ... />
    <startServer name="server3" ... />

But details have not yet been defined.

> The second type of multithreading (which was rejected) would allow
> us to multithread entire tasks, meaning the build process wouldn't
> stop and wait for a return.

Nope.  The one that has been rejected was something like the
following.  Consider

<target name="A" />
<target name="B" />
<target name="C" depends="A,B" />

as A and B have no explicit dependency on each other they could be run
in parallel when you want to prepare for C.  In reality many people
will rely upon A to be run before C.  Furthermore many tasks (and to a
certain extent Ant's core) have not been designed with multithreading
in mind, so this would be more than a bit dangerous.

This has been rejected for now, but could be added at some later point
in Ant development.


View raw message