fred
fred copied to clipboard
Fix synchronization on _matched
This might have been valid originally but broke because of adding asynchronous filters.
If _matched
posed a problem, _message
is problematic as well. getMessage
should then also be synchronized on this
.
(and so should effectively all users of all other member variables be synchronized, although they are not as important as they appear to be of less use to set asynchronously)
Really this needs refactoring so we use another object and can make stuff final. One serious concern is that it can call callbacks inside methods that ought to have more locking!
Can't we use ThreadLocal for that?
@nextgens @bertm Can you validate that this PR is mergeable as is and create another Issue for a potentiel other target (https://github.com/hyphanet/fred/pull/504#issuecomment-197018555) and for a ThreadLocal solution (https://github.com/hyphanet/fred/pull/504#issuecomment-231556996) ?