dragon-zhang commented on PR #10021:
URL: https://github.com/apache/dubbo/pull/10021#issuecomment-1159943022

   sure, thanks!
   
   
   
   
   
   
   
   ------------------ Original ------------------
   From: Albumen Kevin ***@***.***>
   Date: Mon,Jun 20,2022 10:01 AM
   To: apache/dubbo ***@***.***>
   Cc: dragon-zhang ***@***.***>, Mention ***@***.***>
   Subject: Re: [apache/dubbo] [ISSUE #10020] add MemorySafeLinkedBlockingQueue 
(PR #10021)
   
   
   
   
   
    
   @AlbumenJ commented on this pull request.
    
    
   In 
dubbo-common/src/main/java/org/apache/dubbo/common/threadpool/MemoryLimitCalculator.java:
    > +import java.util.concurrent.ScheduledExecutorService; +import 
java.util.concurrent.TimeUnit; + +/** + * ***@***.*** 
java.lang.Runtime#freeMemory()} technology is used to calculate the + * memory 
limit by using the percentage of the current maximum available memory, + * 
which can be used with ***@***.*** MemoryLimiter}. + * + * @see MemoryLimiter + 
* @see <a 
href="https://github.com/apache/incubator-shenyu/blob/master/shenyu-common/src/main/java/org/apache/shenyu/common/concurrent/MemoryLimitCalculator.java"&gt;MemoryLimitCalculator</a&gt;
 + */ +public class MemoryLimitCalculator { + +    private static volatile long 
maxAvailable; + +    private static final ScheduledExecutorService SCHEDULER = 
Executors.newSingleThreadScheduledExecutor();  
   This scheduledExecutorService can be managed by Dubbo Framework. I will 
patch it later.
    
   —
   Reply to this email directly, view it on GitHub, or unsubscribe.
   You are receiving this because you were mentioned.Message ID: ***@***.***&gt;


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