ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 41603] New: - external jython classes are not thread-safe
Date Tue, 13 Feb 2007 22:25:36 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41603>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41603

           Summary: external jython classes are not thread-safe
           Product: Ant
           Version: 1.7.0RC1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: dev@ant.apache.org
        ReportedBy: josborne@exstream.com


file threadtest.py:
class threadtester:
  def __init__( self, list=[] ):
    self.list = list


file threadtest.xml:
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="unix-build-all" name="comp-all">

  <target name="unix-build-all">
    <parallel failonany='false'>
      <antcall target="testtarget">
        <param name="sleep" value="1" />
      </antcall>
      <antcall target="testtarget">
        <param name="sleep" value="2" />
      </antcall>
      <antcall target="testtarget">
        <param name="sleep" value="3" />
      </antcall>
      <antcall target="testtarget">
        <param name="sleep" value="4" />
      </antcall>
      <antcall target="testtarget">
        <param name="sleep" value="5" />
      </antcall>
    </parallel>
  </target>

  <target name="testtarget">
    <sleep seconds="${sleep}"/>
    <threadtest></threadtest>
  </target>

  <scriptdef name="threadtest" language="jython">
       <attribute name="key"/>
<![CDATA[
from threadtest import *

test = threadtester()
test.list.append("test")
project.log("Beginning thread test...")
for i in test.list:
  project.log(i)
project.log("Ending thread test.\n\n")

]]>
  </scriptdef>

</project>

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message