You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/04/22 13:41:16 UTC

[GitHub] [dubbo] guohao commented on a diff in pull request #9954: [3.0] opt code of Connection

guohao commented on code in PR #9954:
URL: https://github.com/apache/dubbo/pull/9954#discussion_r856240545


##########
dubbo-remoting/dubbo-remoting-api/src/main/java/org/apache/dubbo/remoting/api/Connection.java:
##########
@@ -192,10 +192,8 @@ public boolean isAvailable() {
         if (channel != null && channel.isActive()) {
             return true;
         }
-        synchronized (this) {

Review Comment:
   ![image](https://user-images.githubusercontent.com/13098309/164725902-5e406b1b-4b3c-4197-926b-a4075fafd29c.png)
   
   `sync` has added when creating `promise`, so is it enough that just a `cas` here  ?



-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org