ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gus Heck <gus-ant...@cognition.olin.edu>
Subject Re: [VOTE] JDK 1.1 support
Date Thu, 20 Mar 2003 15:47:13 GMT

> Having said that, has anyone ever thought about whether the transition
> from synchronized 1.1 collections to unsynchronized 1.2 collections
> might pose any problems?
> 

At one time my understanding was that ant was esentially single 
threaded, but I just did some grepping and found the following places 
where threads are created... So I suspect the answer isn't a simple no, 
and quite probably requires careful review. The one hopeful thing I see 
is that there doesn't seem to be any thread creation outside of 
taskdefs. So it would appear that the core may in fact be single 
threaded. (note: I just realized that this copy hasn't been updated in a 
month or two, so recent changes are not reflected here)

----------------------------------------------------------------------
[jakarta-ant]$ grep -r 'new Thread' . | grep java | grep -v '.xml:' | 
grep -v proposal | grep -v testcases
----------------------------------------------------------------------
./src/main/org/apache/tools/ant/taskdefs/ExecuteJava.java: 
   thread = new Thread(this, "ExecuteJava");
./src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java: 
final Thread result = new Thread(new StreamPumper(is, os));
./src/main/org/apache/tools/ant/taskdefs/optional/Cab.java: 
    (new Thread(outPump)).start();
./src/main/org/apache/tools/ant/taskdefs/optional/Cab.java: 
    (new Thread(errPump)).start();
./src/main/org/apache/tools/ant/taskdefs/optional/ide/VAJBuildInfo.java: 
            buildThread = new Thread(this);
./src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAuditStreamHandler.java: 
        final Thread result = new Thread(new StreamPumper(is, os));
./src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4HandlerAdapter.java: 
            Thread output = new Thread(new Reader(is));
./src/main/org/apache/tools/ant/taskdefs/optional/perforce/P4HandlerAdapter.java: 
            Thread error = new Thread(new Reader(es));
./src/main/org/apache/tools/ant/util/Watchdog.java:        Thread t = 
new Thread(this, "WATCHDOG");

----------------------------------------------------------------------
[jakarta-ant]$ grep -r 'extends Thread' . | grep java | grep -v '.xml:' 
| grep -v proposal | grep -v testcases
----------------------------------------------------------------------
./src/main/org/apache/tools/ant/taskdefs/Exec.java:    class 
StreamPumper extends Thread {
./src/main/org/apache/tools/ant/taskdefs/Parallel.java:    class 
TaskThread extends Thread {
./src/main/org/apache/tools/ant/taskdefs/ProcessDestroyer.java: 
extends Thread {
./src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java: 
    private class RedirectOutput extends Thread {
[gus@draco jakarta-ant]$

----------------------------------------------------------------------
[jakarta-ant]$ grep -r 'new StreamPumper' . | grep java | grep -v 
'.xml:' | grep -v proposal | grep -v testcases
----------------------------------------------------------------------
./src/main/org/apache/tools/ant/taskdefs/Exec.java:                new 
StreamPumper(proc.getInputStream(), Project.MSG_INFO);
./src/main/org/apache/tools/ant/taskdefs/Exec.java:                new 
StreamPumper(proc.getErrorStream(), Project.MSG_WARN);
./src/main/org/apache/tools/ant/taskdefs/PumpStreamHandler.java: 
final Thread result = new Thread(new StreamPumper(is, os));
./src/main/org/apache/tools/ant/taskdefs/optional/Cab.java: 
    StreamPumper    outPump = new StreamPumper(p.getInputStream(), outLog);
./src/main/org/apache/tools/ant/taskdefs/optional/Cab.java: 
    StreamPumper    errPump = new StreamPumper(p.getErrorStream(), errLog);
./src/main/org/apache/tools/ant/taskdefs/optional/metamata/MAuditStreamHandler.java: 
        final Thread result = new Thread(new StreamPumper(is, os));

----------------------------------------------------------------------
[jakarta-ant]$ grep -r 'new TaskThread' . | grep java | grep -v '.xml:' 
| grep -v proposal | grep -v testcases
----------------------------------------------------------------------
./src/main/org/apache/tools/ant/taskdefs/Parallel.java: 
TaskThread[] threads = new TaskThread[nestedTasks.size()];
./src/main/org/apache/tools/ant/taskdefs/Parallel.java: 
threads[threadNumber] = new TaskThread(threadNumber, nestedTask);
./src/main/org/apache/tools/ant/taskdefs/Parallel.java:         * 
Construct a new TaskThread.<p>

----------------------------------------------------------------------
[jakarta-ant]$ grep -r 'new RedirectOutput' . | grep java | grep -v 
'.xml:' | grep -v proposal | grep -v testcases
----------------------------------------------------------------------
./src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java: 
            RedirectOutput output = new RedirectOutput(p.getInputStream());
./src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbc.java: 
            RedirectOutput error  = new RedirectOutput(p.getErrorStream());

----------------------------------------------------------------------
[jakarta-ant]$ grep -r 'new ProcessDestroyer' . | grep java | grep -v 
'.xml:' | grep -v proposal | grep -v testcases
----------------------------------------------------------------------
./src/main/org/apache/tools/ant/taskdefs/Execute.java:    private static 
ProcessDestroyer processDestroyer = new ProcessDestroyer();


Gus


Mime
View raw message