Menu

#1295 [HHQ-1838] MeasTabManagerUtil locks in each iteration of get

open
None
1
2012-10-09
2008-04-17
No

http://jira.hyperic.com/browse/HHQ-1838
 78 List ranges = MeasRangeObj.getInstance().getRanges();


 79 for (Iterator i=ranges.iterator(); i.hasNext(); )


 80 {


 81 MeasRange range = (MeasRange)i.next();


 82 String table = MeasRangeObj.getInstance().getTable(end);



line 82 should be written like this to avoid locking on each iteration of the for loop ->



 82 String table = MeasRangeObj.getInstance().getTable(ranges, end);



This obj's lock could be quite contentious in a larger environment so the less amount of locking the better. The change is extremely trivial and obvious.


Discussion

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.