CycleMaker commented on code in PR #13609:
URL: https://github.com/apache/dubbo/pull/13609#discussion_r1441998250


##########
dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/support/AbortPolicyWithReport.java:
##########
@@ -158,6 +158,7 @@ private void dumpJStack() {
         }
         // To avoid multiple dump, check again
         if (System.currentTimeMillis() - lastPrintTime < TEN_MINUTES_MILLS) {
+            guard.release();

Review Comment:
   sorry,I didn't unstand.I haven't realized the advantages of moving these 
codes into try-finally block.
   is this what you means? 
   
           if (!guard.tryAcquire()) {
               return;
           }
           
           ExecutorService pool;
           try {
               // To avoid multiple dump, check again
               if (System.currentTimeMillis() - lastPrintTime < 
TEN_MINUTES_MILLS) {
                   guard.release();
                   return;
               }
               pool = Executors.newSingleThreadExecutor();
               ...........
   



-- 
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-unsubscr...@dubbo.apache.org

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


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

Reply via email to