BurningCN commented on a change in pull request #9510:
URL: https://github.com/apache/dubbo/pull/9510#discussion_r801411643



##########
File path: 
dubbo-registry/dubbo-registry-api/src/main/java/org/apache/dubbo/registry/client/event/listener/ServiceInstancesChangedListener.java
##########
@@ -84,8 +82,8 @@
     public ServiceInstancesChangedListener(Set<String> serviceNames, 
ServiceDiscovery serviceDiscovery) {
         this.serviceNames = serviceNames;
         this.serviceDiscovery = serviceDiscovery;
-        this.listeners = new ConcurrentHashMap<>();
-        this.listenerQueue = new ConcurrentLinkedQueue<>();
+        this.listeners = new HashMap<>();
+        this.listenerQueue = new LinkedList<>();

Review comment:
       Currently the `notifyAddressChanged` method is only called by the 
`doOnEvent` method with the `synchronized` modifier. The concurrent scenario 
you are talking about is that `notifyAddressChanged` may be called by 
subclasses in the future?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to