You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Thomas Voigt <tv...@gmx.de> on 2007/05/25 13:36:56 UTC
Parallel tasks and Windows
Hi,
I posed this question some time ago, but did not get any answers. I thought after half a year (and unfortunately no new insights) I'd try again, because this behaviour seriously prolongs our build time :-\
I stumbled upon a curious problem with the ant parallel handling in conjunction with Windows XP.
Let's say I have 3 targets: call1, call2 and call3 which are executed in a parallel environment (2 threads). Each target calls a hello world windows GUI application that has to be closed manually and prints an exit confirmation afterwards. Ant starts call1 and call2 correctly in parallel. Now the curious thing is that ant will sometimes (not always) wait for _both_ tasks to end before it starts the third task. No output is written until both tasks are finished.
The problem is not limited to GUI applications, we have the same behaviour if we call the VS2005 C++ compiler :-(
We tried to reproduce the problem by replacing the hello world calls with various ant sleep commands, but this seemed to work fine, the third task is always started immediately after one of the first two tasks exits.
Any insights?
Regards, Thomas
--
GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Parallel tasks and Windows
Posted by Thomas Voigt <tv...@gmx.de>.
-------- Original-Nachricht --------
Datum: Fri, 25 May 2007 12:44:50 -0400
Von: "David Weintraub" <qa...@gmail.com>
An: "Ant Users List" <us...@ant.apache.org>
Betreff: Re: Parallel tasks and Windows
> Wonder if this has to do with the fact that Windows cannot spawn a new
> process. Windows can only spawn new threads, and I wonder if there is
> something either in your Java startup or your Ant startup script that
> limits the number of threads to two.
No, if I use parallel with 4 threads then I can start 4 processes. After closing two, the next two are opened. (Haven't checked if ant always behaves this way.) The processes were started from a DOS shell.
I wonder if anything has changed with Java 1.5 and ant 1.7? Half a year ago with java 1.4/ant 1.65, the behaviour was inconsistent - with 4 processes and two threads, sometimes closing one process would result in a new process (roughly half of the time, probably depending on which process was spawned first). Today I always had to close both applications in order to get the next two.
Regards, Thomas
>
> On 5/25/07, Thomas Voigt <tv...@gmx.de> wrote:
> > Hi,
> >
> > I posed this question some time ago, but did not get any answers. I
> thought after half a year (and unfortunately no new insights) I'd try again,
> because this behaviour seriously prolongs our build time :-\
> >
> > I stumbled upon a curious problem with the ant parallel handling in
> conjunction with Windows XP.
> >
> > Let's say I have 3 targets: call1, call2 and call3 which are executed in
> a parallel environment (2 threads). Each target calls a hello world
> windows GUI application that has to be closed manually and prints an exit
> confirmation afterwards. Ant starts call1 and call2 correctly in parallel. Now the
> curious thing is that ant will sometimes (not always) wait for _both_
> tasks to end before it starts the third task. No output is written until both
> tasks are finished.
> >
> > The problem is not limited to GUI applications, we have the same
> behaviour if we call the VS2005 C++ compiler :-(
> >
> > We tried to reproduce the problem by replacing the hello world calls
> with various ant sleep commands, but this seemed to work fine, the third task
> is always started immediately after one of the first two tasks exits.
> >
> > Any insights?
> >
> > Regards, Thomas
> >
> > --
> > GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
> > Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> > For additional commands, e-mail: user-help@ant.apache.org
> >
> >
>
>
> --
> --
> David Weintraub
> qazwart@gmail.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
--
Psssst! Schon vom neuen GMX MultiMessenger gehört?
Der kanns mit allen: http://www.gmx.net/de/go/multimessenger
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: Parallel tasks and Windows
Posted by David Weintraub <qa...@gmail.com>.
Wonder if this has to do with the fact that Windows cannot spawn a new
process. Windows can only spawn new threads, and I wonder if there is
something either in your Java startup or your Ant startup script that
limits the number of threads to two.
On 5/25/07, Thomas Voigt <tv...@gmx.de> wrote:
> Hi,
>
> I posed this question some time ago, but did not get any answers. I thought after half a year (and unfortunately no new insights) I'd try again, because this behaviour seriously prolongs our build time :-\
>
> I stumbled upon a curious problem with the ant parallel handling in conjunction with Windows XP.
>
> Let's say I have 3 targets: call1, call2 and call3 which are executed in a parallel environment (2 threads). Each target calls a hello world windows GUI application that has to be closed manually and prints an exit confirmation afterwards. Ant starts call1 and call2 correctly in parallel. Now the curious thing is that ant will sometimes (not always) wait for _both_ tasks to end before it starts the third task. No output is written until both tasks are finished.
>
> The problem is not limited to GUI applications, we have the same behaviour if we call the VS2005 C++ compiler :-(
>
> We tried to reproduce the problem by replacing the hello world calls with various ant sleep commands, but this seemed to work fine, the third task is always started immediately after one of the first two tasks exits.
>
> Any insights?
>
> Regards, Thomas
>
> --
> GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
> Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
--
--
David Weintraub
qazwart@gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
RE: Parallel tasks and Windows
Posted by "Anderson, Rob (Global Trade)" <Ro...@nike.com>.
Sorry to hear that your issue is still unresolved. I suggest entering a
bug report in the bug database. Of course, you might want to search the
bug database first, to see if the issue is already documented in there.
-Rob Anderson
> -----Original Message-----
> From: Thomas Voigt [mailto:tvo_spambox@gmx.de]
> Sent: Friday, May 25, 2007 4:37 AM
> To: user@ant.apache.org
> Subject: Parallel tasks and Windows
>
> Hi,
>
> I posed this question some time ago, but did not get any
> answers. I thought after half a year (and unfortunately no
> new insights) I'd try again, because this behaviour seriously
> prolongs our build time :-\
>
> I stumbled upon a curious problem with the ant parallel
> handling in conjunction with Windows XP.
>
> Let's say I have 3 targets: call1, call2 and call3 which are
> executed in a parallel environment (2 threads). Each target
> calls a hello world windows GUI application that has to be
> closed manually and prints an exit confirmation afterwards.
> Ant starts call1 and call2 correctly in parallel. Now the
> curious thing is that ant will sometimes (not always) wait
> for _both_ tasks to end before it starts the third task. No
> output is written until both tasks are finished.
>
> The problem is not limited to GUI applications, we have the
> same behaviour if we call the VS2005 C++ compiler :-(
>
> We tried to reproduce the problem by replacing the hello
> world calls with various ant sleep commands, but this seemed
> to work fine, the third task is always started immediately
> after one of the first two tasks exits.
>
> Any insights?
>
> Regards, Thomas
>
> --
> GMX FreeMail: 1 GB Postfach, 5 E-Mail-Adressen, 10 Free SMS.
> Alle Infos und kostenlose Anmeldung: http://www.gmx.net/de/go/freemail
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For
> additional commands, e-mail: user-help@ant.apache.org
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org