-
Notifications
You must be signed in to change notification settings - Fork 874
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Use ConcurrentMap for 'packages' map and remove some synchronized blocks - Use ConcurrentHashMap.newKeySet() instead of Collections.synchronizedSet for 'ARBITRARY_LOAD_WARNINGS' Set - Move some logic outside a sync block in 'getPackageFast' method - Remove unused variables For ProxyClassPackages: - Use ConcurrentMap for 'PACKAGE_COVERAGE' map and remove the synchronized methods for the get operation - Use synchronized on the 'PACKAGE_COVERAGE' map for the add and remove operations, they need to be linearizable. - The 'findCoveredPkg' method should return a consistent value. The 'computeIfPresent' implementation from ConcurrentHashMap synchronize the field that is reading to prevent consistency issues with the other methods (add or remove) modifying the Map. Thanks to mbien, neilcsmith, and sdedic.
- Loading branch information
Showing
2 changed files
with
56 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters