fred icon indicating copy to clipboard operation
fred copied to clipboard

Fix synchronization on _matched

Open toad opened this issue 9 years ago • 4 comments

This might have been valid originally but broke because of adding asynchronous filters.

toad avatar Feb 24 '16 16:02 toad

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)

bertm avatar Mar 15 '16 21:03 bertm

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!

toad avatar Mar 15 '16 21:03 toad

Can't we use ThreadLocal for that?

nextgens avatar Jul 09 '16 21:07 nextgens

@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) ?

hernic avatar May 06 '24 11:05 hernic