Thanks for all the hard work Jean-Francois.

1) Could you open a new BugZilla enhancement, and attach you patch there?
This would allow to discuss you changes there, easily referenceable.

2) Why did you have to modify Task.java? It doesn't seem warranted, and
probably will not fly well with the committers.

3) Any chance you might be able to write unit tests specific to the 'spawn'
mode of <exec>?

Also, what happens of the spawned process stdin/stdout/stderr? Do you force
redirecting to a file? If I spawn a process from Ant, Ant finishes, and I
close the console, will the program stop and/or hang and/or its output will
simply be lost???

Thanks, --DD

-----Original Message-----
From: Jeanfrancois Arcand [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 22, 2003 1:29 PM
To: [EMAIL PROTECTED]
Subject: [Proposal] Running task asynchrously (+ patche)

HI,

attached is a tentative patch that allow a Task object to run
asychronously. I have tested the patch on Solaris and win2k and
everything works fine (without breaking backward compatibility).

To use the functionality, you just have to add to a task the spawn
attribute, e.g.:

<exec dir="c:/src/jakarta-tomcat-5/build/bin/" executable="sh" spawn="true">

Since some task needs a couple of seconds to start/stop, I also added a
spawnWaitUntil attribute where you can set the time required before
moving to the next Task.

I did no wrote a <spawn> task because I think the functionality should
be available to every Task. For now I did not add the functionality to
Java, Javac, Jar.

Let me know what you think. At least I have something use when <gump>ing 
tomcat :-)

Thanks,

-- Jeanfrancois


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to