ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Perrier, Nathan" <nperr...@ptc.com>
Subject RE: Atomic/Synchronized Task
Date Thu, 24 Jun 2010 21:34:40 GMT
No, that's just a wrapper task that executes the subtasks it wraps in
order.  It is not "thread-safe", which is what I am looking for.

Basically, what I'm looking for is a locking mechanism for certain tasks
that can't run in parallel.


-----Original Message-----
From: Matt Benson [mailto:gudnabrsam@gmail.com] 
Sent: Thursday, June 24, 2010 4:24 PM
To: Ant Users List
Subject: Re: Atomic/Synchronized Task


On Jun 24, 2010, at 4:04 PM, Perrier, Nathan wrote:

> Hello all,
> 
> 
> 
> I was curious if there exists a means to atomically execute tasks when
> running targets in parallel.
> 

<sequential> ?

-Matt

> 
> 
> I.E., I would like to do something like the following:
> 
> 
> 
> <target name="begin">
> 
>                <parallel>
> 
>                                <antcall target="one"/>
> 
>                                <antcall target="two"/>
> 
>                </parallel>
> 
> </target>
> 
> 
> 
> <target name="one">
> 
> ...
> 
>                Do something in parallel
> 
> ...
> 
>                <synchronized>
> 
> ...
> 
>                                Do something atomically
> 
> ...
> 
>                </synchronized>
> 
> ...
> 
> </target>
> 
> 
> 
> <target name="two">
> 
> ...
> 
>                Do something in parallel
> 
> ...
> 
>                <synchronized>
> 
> ...
> 
>                                Do something atomically
> 
> ...
> 
>                </synchronized>
> 
> ...
> 
> </target>
> 
> 
> 


---------------------------------------------------------------------
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


Mime
View raw message