ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 52188] DirectoryScanner is not threadsafe
Date Thu, 17 Nov 2011 11:17:18 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=52188

--- Comment #3 from Stefan Bodewig <bodewig@apache.org> 2011-11-17 11:17:18 UTC ---
Your patch synchronizes access to the default excludes - which may be a good
thing to do in any case - which implies the tasks you are running in parallel
are modifying the default excludes.  How can you ensure consistent results?

About your patch, I probably wouldn't make defaultExcludes volatile but rather
final (and rewrite the reset method to clear the set rather than create a new
one) - in particular since you are synchronizing on it.

Did you really have to make isExcluded and isSelected synchronized?  These
instance methods shouldn't be used by multiple threads in your parallel
scenario at all.

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

Mime
View raw message