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 2021/09/27 03:38:03 UTC

[GitHub] [dubbo] kylixs commented on a change in pull request #8928: [3.0] destroy executor and improve tests 0926

kylixs commented on a change in pull request #8928:
URL: https://github.com/apache/dubbo/pull/8928#discussion_r716337738



##########
File path: dubbo-cluster/src/main/java/org/apache/dubbo/rpc/cluster/RouterChain.java
##########
@@ -271,14 +272,23 @@ public void loop(boolean notify) {
         if (firstBuildCache.compareAndSet(true,false)) {
             buildCache(notify);
         }
-        if (notify) {
-            if (loopPermitNotify.tryAcquire()) {
-                loopPool.submit(new NotifyLoopRunnable(true, loopPermitNotify));
+
+        try {
+            if (notify) {

Review comment:
       The above code logic is not exactly the same as the original one:
   if notify==true and loopPermitNotify.tryAcquire() == false,  **no attempt to acquire the loopPermit lock, and no operation will be performed.**
   




-- 
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