Having learned about how the java memory model really works, I have had a quick code review of the threading here.
1. stuff that is shared read is always marked volatile, to avoid being compiled out.
2. added more synchronization when appropriate.
I make no claims as to thread safety here, as I was never that good at formal proofs of correctness.
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@465013 13f79535-47bb-0310-9956-ffa450edef68