jkf 2004/12/09 14:17:24 Modified: src/main/org/apache/tools/ant/taskdefs Parallel.java Log: In bug 32566 someone asked about the thread safety requirements in Ant. This made me perform a quick check on the main flow of the Ant project from a threading perspective. The only cause for wich the tasks specified in the build file may be executed in another thread is the parallel task. The parallel task does not ensure all variables are stored in memory before the new threads start. Revision Changes Path 1.30 +8 -0 ant/src/main/org/apache/tools/ant/taskdefs/Parallel.java Index: Parallel.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Parallel.java,v retrieving revision 1.29 retrieving revision 1.30 diff -u -r1.29 -r1.30 --- Parallel.java 1 Apr 2004 13:06:45 -0000 1.29 +++ Parallel.java 9 Dec 2004 22:17:24 -0000 1.30 @@ -266,6 +266,14 @@ } synchronized (semaphore) { + // When we leave this block we can be sure all data is really + // stored in main memory before the new threads start, the new + // threads will for sure load the data from main memory. + // + // This probably is slightly paranoid. + } + + synchronized (semaphore) { // start any daemon threads if (daemons != null) { for (int i = 0; i < daemons.length; ++i) {
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]