ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conor MacNeill" <co...@cortexebusiness.com.au>
Subject Re: exec in thread
Date Fri, 20 Apr 2001 14:51:35 GMT
Salman,

A couple of issues. I understand this is incomplete and there are therefore
some issues you have yet to encounter.

Firstly, we have been discussing supporting parallel execution of tasks
within a target. This will satisfy a number of needs to either run test
harnesses against servers or to better utilise powerful hardware during a
build. A possible expression might be

<target>
   <parallel>
       <javac>
       <javac>
   </parallel>
</target>

Now, that is not quite what you are proposing - you are basically just
running the thread and forgetting about it - you don't join to that thread
again. Rather than tackle this for the particular task (exec), this could
be approached as

<target>
    <daemon>
        <exec>
    </daemon>
</target>

Thus any task could be run in the background and not just exec. I think,
however, we need to think carefully about the implications of threads
running while ant continues to run. If the thread continues to interact
with Ant there may be synchronization or deadlock issues. Also the thread
may keep the Ant VM alive when Ant itself has finished.

Anyway, if you continue to go with your task, I think one issue you will
encounter is the management of the output of the exec task and connecting
that into Ant's event mechanism.

Conor




----- Original Message -----
From: "Halim, Salman" <salman@Bluestone.com>
To: <ant-dev@jakarta.apache.org>
Sent: Saturday, April 21, 2001 12:05 AM
Subject: FW: exec in thread


> hi,
>
> i didn't recieve a response last time so i'm trying again. . .  any
advice
> is appreciated.  thank you!
>
> --
> Salman Halim
> Advisory Software Engineer, HP Bluestone
> Quidquid latine dictum sit, altum viditur.
>
>
> -----Original Message-----
> From: Halim, Salman [mailto:salman@Bluestone.com]
> Sent: Tuesday, April 17, 2001 3:56 PM
> To: 'ant-user@jakarta.apache.org'; 'ant-dev@jakarta.apache.org'
> Subject: exec in thread
>
>
> hi,
>
> i have the attached MyExec class; this is supposed to be a primitive
> replacement for the exec task that will run its target in the background
(by
> spawning a thread and running in there).  it isn't complete yet, but i
> wanted to do some testing before going any further:
>
> in short, the thread doesn't continue to run once the main class is done.
> if i uncomment the delay loop in there, then it runs (because the main
> MyExec is still running).
>
> can anybody see if i'm doing something anti-ant in there, please?  this
> class is not very complicated, i promise!
>
> thank you in advance,
>
> --
> Salman Halim
> Advisory Software Engineer, HP Bluestone
> Quidquid latine dictum sit, altum viditur.
>
>
>
>


Mime
View raw message