ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 62824] Nested macro attributes not thread safe
Date Sun, 16 Dec 2018 18:53:33 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=62824

Stefan Bodewig <bodewig@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #1 from Stefan Bodewig <bodewig@apache.org> ---
Actually, this is not related to macro attributes at all. What you are doing is
similar to

        <target name="repro2">
          <parallel>
            <sequential>
              <macrodef name="innerMacro">
                <sequential>
                  <echo message="Temp: true"/>
                </sequential>
              </macrodef>
              <innerMacro />
            </sequential>
            <sequential>
              <macrodef name="innerMacro">
                <sequential>
                  <echo message="Temp: false"/>
                </sequential>
              </macrodef>
              <innerMacro />
            </sequential>
          </parallel>
        </target>

I.e. you define the same task "innerMacro" twice and when it comes to the point
where innerMacro is excecuted there is a race condition which task definition
is the one that gets used (the last one executed before the actual task is
run).

Defining macros of the same name simply is not a thread-safe operation (neither
would be running taksdef, typedef, scritpdef or presetdef defining same named
"things".

-- 
You are receiving this mail because:
You are the assignee for the bug.
Mime
View raw message