Fenzo
Fenzo copied to clipboard
Synchronization
I noticed that there was synchronization being done around a ConcurrentMap
which would incur a performance hit. At first I thought this was maybe to make the get()
+ put()
operations atomic but I only see one place where the map inside of the map (the value) is touched: Map existingTriggerMap = map.putIfAbsent(group, subMap);
.
The other half of this patch addresses some inconsistent synchronization where some methods were synchronized while others were not. It looked like this would potentially cause the methods to work with inconsistent state.