Jeffrey E Care wrote:
This may sound naive, but honestly I would not expect many.
Ant already has the <parallel> task, which of course is running things
in
other threads; additionally in the WAS build tools we already have
what is
essentially the equivalent to a parallel subant, and it's working
fine.
Would you expect a lot of threading-related errors from the Ant core
classes? If so what areas in particular are you worried about?
I just worry that nothing has been written for thread safety, and
generally that is bad news. I am not even sure that property read/write
is atomic right now.
Would that matter? All property reads/writes would be confined to the
thread there the project is being executed. The main problem I think would
be in the logger, but I've modified our custom logger to do thread
correlation & buffering; these changes should easily map to Ant's
DefaultLogger.
Input is another issue.
If there's a lot of general concern/opposition about this function I don't
want to take the time to develop a patch only to see it languish in
bugzilla or be outright rejected (which is why I wanted to discuss it here
first). Would it be appropriate to add this function and put a warning in
the manual that using the parallel execution could potentially be
dangerous?
to an extent <parallel> is the most prone to race conditions, as it is
running stuff in the same project. a subant running in parallel is
likely to share much less, just a FileUtils instance and maybe some
references handed down.
The reason why I'm sort of pushing so hard for this function is that we've
already implemented something similar in the WAS build tools and it's
shaved 25-30% off of some of our builds with no adverse effects.
I guess we can view that as a functional test :) What hardware were you
running on? How many CPUs?
Maybe the thing to do would be to add lots of warnings around it, "use
at your own risk", and note in the task writing guidelines about thread
safety. A review of Project and some other core classes for possible
race conditions
-steve
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]