ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peterrei...@apache.org>
Subject Re: local properties
Date Wed, 20 Oct 2004 09:57:53 GMT
Jose Alberto Fernandez wrote:

>For example, the usage of ThreadLocals in other
>proposals may be right for some things, but it may be wrong if I am
>trying to use properties to communicate between threads. (Which I can do
>with regular properties).
>
>  
>
You are correct.
Using the following:

<macrodef name="x">
   <localproperty name="aprop"/>
   <sequential>
      <parallel>
          <sequential>
              <property name="aprop" value="set"/>
              <echo>aprop is ${aprop}</echo>
           </sequential>
      </parallel>
      <echo>aprop is ${aprop}</echo>
   </sequential>
</macrodef>

One would expect that this macro would produce
[echo] aprop is set
[echo] aprop is set

rather than
[echo] aprop is set
[echo] aprop is ${aprop}

I am modifying the local patch code to do this.

Peter


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message